[clean-list] Re: Matrix timings

Shivkumar Chandrasekaran shiv@ece.ucsb.edu
Mon, 5 Nov 2001 11:19:04 -0800


Is there some documentation somewhere which describes what kind of 
"loops" involving unique arrays will be "optimized" by the Clean 
compiler?

The reason I ask is that it seems pretty difficult to predict how the 
Clean compiler will behave. For example, sometimes 2D arrays 
comprehensions seem to be reasonably efficient, and sometimes not. Also, 
when we row-scan a 2D array does the compiler prefer that we explicitly 
bind a variable to the row we are scanning?

 From past experience with common lisp compilers I know that compilers 
sometimes prefer to see certain idiomatic loop expressions before they 
generate good code.

(Rhetorical question: may be that is the reason why OCaml has explicit 
for-loops and its code generation is comparable to gcc?)

Thanks,

--shiv--