Additionally, using closures/nested functions can often negatively impact 
performance due to an implementation detail of Julia that is actively being 
resolved.

Try moving "sub" to the top level and having it take "val" as an explicit 
parameter - I'd be curious how that, plus the switch to push!, ultimately 
impacts running time. If you could post the final optimized program for 
posterity's sake, that would be great! 

On Monday, October 19, 2015 at 2:43:31 AM UTC-5, Patrick Useldinger wrote:
>
> Hello Daniel, 
> you're spot on. Using push! gets me down to 1.1 seconds.
> Will look into the linked list later.
> Sorry for the noise ;-)
> -Patrick
>

Reply via email to