Roger Hui wrote:
> f can be rendered readily in C. ...

A nice thing about this approach (aside from being far less verbose than the
state machine I posted) is that it allows you to eliminate almost all
conditional code. 
 
On modern CPUs, "balanced" if statements (where one choice is about as likely as
the other) can be a significant time waster.
 
For example, the code appears to require an if statement inside the loop, but 
the
loop can be unrolled so that it increments by 2 (and since first and last corner
can be generated outside the loop, this adds minimal complexity).
 
-- 
Raul
 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to