News for hackers. Stuff that matters.
Re:Python 3.11 is faster than 3.8 by cb321 on Wednesday October 26, 2022 @03:10PM (#33347990)
With Nim `nimble build -d:danger -d:lto --passC:-march=native` I just got 1920 frames/s while with your rust build only 1237 fps on the same machine (EDIT: and 1307 frames/s with C++.)
Re:Python 3.11 is faster than 3.8 by plainOldText on Wednesday October 26, 2022 @03:14PM (#33348045)
In that case, did you also run rust with the equivalent RUSTFLAGS="-C target-cpu=native"? :)

Perhaps benchmarks should be compared on equal footing, say, with the default release flag or all optimizations turned on, otherwise they're improper.

Re:Python 3.11 is faster than 3.8 by cb321 on Wednesday October 26, 2022 @03:17PM (#33348084)
I tried. That actually made the rust slower for me (i7-6700k, gcc-12.2, rustc-1.64). 1180 frames/s. And without the -march=native the Nim was at 1620. And it also did not help the C++ branch (but helped Nim about 1.2x).

But really the original author/poster should do some set on his box. I cannot even compile/run all his things. The point of my comment was just to give a reference for how far off impressions can be from build flags. PGO (available to Nim, c++, but maybe not to Rust yet?) is a whole other set of maybe nothing burgers or maybe big improvements.

(But, btw, I could not agree more that all experiments in this entire general space should have various big, bold disclaimers. Over-concluding from these things is rampant.)

Re:Python 3.11 is faster than 3.8 by plainOldText on Wednesday October 26, 2022 @03:26PM (#33348180)
Yes, tweaking the compiler flags can alter the performance substantially. I'm glad to see Nim so fast though.
Re:Python 3.11 is faster than 3.8 by cb321 on Wednesday October 26, 2022 @04:00PM (#33348606)
And with the author's hot off the presses nim flags I get only 1464 fps. So, 1920/1464 = 1.31 for my nim compile flags vs. his new ones, only a little less than the 2521/1626 that was interesting people.

For something super jumpy like a simulator, I would find it unsurprising for PGO to make up (or surpass) the difference to Zig in both Nim and C++. 20 years ago there was this ACOVEA [1] project to try to discover great sets of gcc flags that could often find 2X improvements in object code speed for me.

The range from build flags/procedures is often much greater than the supposedly interesting cross-language variation. These things often more measure developer experience/persistence than something intrinsic (and build flags/procedures are only part of that experience/persistence).

[1] https://github.com/Acovea/libacovea