4 ms·
Has anyone had any luck reproducing the benchmark figures given for the smallpt program? When I try, gcc handily beats nim in the multi-threaded scenario and th
by bjourne 6y ago
Has anyone had any luck reproducing the benchmark figures given for the smallpt program? When I try, gcc handily beats nim in the multi-threaded scenario and they are neck and neck in the single-threaded one. For 10 samples per pixel:
g++ multi-threaded : 33.52
nim multi-threaded : 36.90
g++ single-threaded: 75.78
nim single-threaded: 75.95
nim 1.2.0, g++ 10.1.0. I used the flags -O3 -march=native -mtune=native -Wall -Werror for gcc and the default flags for nim.
- bjourne 6y agoHere is the code if anyone is interested: https://github.com/bjourne/c-examples/blob/master/programs/smallpt.cpp https://github.com/bjourne/c-examples/blob/master/programs/s... With a few tweaks, g++ beats nim both in the multi-threaded and single-threaded setups.