Hi bearophile,

Thanks for the reply. I changed it to 0..height and it has no measurable effect to the runtime.

The reason I used iota(height) was to test std.parallelism.parallel. On Windows if I do foreach (y; parallel(iota(height))) I do get almost 4x speed up on a quadcore computer. However, on OSX, parallel() either does nothing (LDC) or makes it slower than single threaded(DMD).

On Friday, 31 May 2013 at 01:42:53 UTC, bearophile wrote:
Don't do this:
foreach (y; (iota(height)))

Use this, because those abstractions are not for free:
foreach (y;  0 .. height)

Reply via email to