niklas-heer / speed-comparison

A repo which compares the speed of different programming languages.
https://niklas-heer.github.io/speed-comparison
MIT License
508 stars 79 forks source link

5.5x faster, half as many divisions, recovering accuracy #99

Open PallHaraldsson opened 1 year ago

niklas-heer commented 1 year ago

@PallHaraldsson I appreciate your effort trying to improve the Julia code. It seems that the compilation version of Julia is failing. https://github.com/niklas-heer/speed-comparison/actions/runs/3496877056/jobs/5855300425#step:6:2638

Maybe this is related to the blocker in #57?

PallHaraldsson commented 1 year ago

Hi @niklas-heer, I believe this is done now finally after a long wait, and the speed maintained hopefully, after a fix for StaticCompiler.jl.

A "sufficiently smart compiler" could in theory figure out my transformation, but I very much doubt any will (then would do already), or will come soon, since the optimization isn't very general-purpose?

Why is "Julia (ux4)" marked specially in the graph? Was it at some point the fastest Julia version? Or some other reason for it? Maybe just drop it, in a later PR?

PallHaraldsson commented 1 year ago

Please hold of on merging. I believe I timed 5x faster for sure originally (in Julia REPL), but StaticCompiler.jl couldn't handle that code. Now after fixing it seems slower, I need to see why, and for sure compare to all the right versions.