> While Araqs example macro is very interesting, I strongly assume that 
> performance impact of float literal types is only minimal in most cases.

But that's for floats, perhaps. The only reason I went down that road is 
because I found a noticeable speedup by putting `'i32` and `int32` everywhere, 
but it was easy to miss decorating a literal and made the code visually very 
messy.

The example is the first post code but with N=100 million, and I run that exe 
10 times. On my machine c++ (int32) takes about 7.5 seconds per run, and nim 
(int64) 8.5 seconds per run. If I liberally `i32` decorate, then nim becomes 
identical to the c++ version in runtime.

With @cblake's suggestion, I tried `-march=native` and/or `-mavx` with no 
benefit for me.

Reply via email to