Benchmarking mir.ndslice + lubeck against numpy and Julia

Ola Fosheim Grostad ola.fosheim.grostad at gmail.com
Sun Jan 12 07:04:00 UTC 2020


On Saturday, 11 January 2020 at 21:54:13 UTC, p.shkadzko wrote:
> Today I decided to write a couple of benchmarks to compare D 
> mir with lubeck against Python numpy, then I also added Julia 
> snippets. The results appeared to be quite interesting.

A decent optimizer would remove all your code except the print 
statement. Make sure to output the result of the computation. 
Also make sure you use the same algorithms and accuracy. If you 
write your own innerproduct in one language then you should do so 
in the other languages as well and require the result to follow 
ieee754 by evaluating the result.

Please note that floating point code cannot be fully restructured 
by the optimizer without setting the optimizer to less 
predictable fast-math settings. So it cannot even in theory 
approach hand tuned library code.


More information about the Digitalmars-d mailing list