This is something that many people (understandably) have a hard time 
appreciating, so I think this post should be framed and put up on the julia 
wall.

We go to considerable lengths to try to make code work efficiently in the 
general case (check out subarray.jl and subarray2.jl in master some time...), 
but sometimes there's no competing with a hand-rolled version for a particular 
case. Folks should not be shy to implement such tricks in their own code.

--Tim

On Thursday, March 12, 2015 07:49:49 AM Steven G. Johnson wrote:
> As a general rule, with Julia one needs to unlearn the instinct (from
> Matlab or Python) that "efficiency == clever use of library functions",
> which turns all optimization questions into "is there a built-in function
> for X" (and if the answer is "no" you are out of luck).   Loops are fast,
> and you can easily beat general-purpose library functions with your own
> special-purpose code.

Reply via email to