hanabi1224 / hanabi1224/Programming-Language-Benchmarks
Make nsieve benchmark fair
- Dominant language
- C#
- Stars
- 800
- Forks
- 167
- PR merge metrics
- No merged PRs in 30d
Description
Some of the implementations differ enough to make the comparison worthless. The one standing out the most does seem to be Julia's implementation, which stores an array of booleans in order to speed up the computation. After applying Julia's code logic C++ code gets over twice as fast. All tested with Julia 1.9.2 and g++-13
Here are my results (user time only, Ryzen 4600h);
nsieve 10
C++: 121 ms
Julia: 293 ms
C++ with Julia's code structure: 48 ms
nsieve 12
C++: 681 ms
Julia: 466 ms
C++ with Julia's code structure: 243 ms
I have attached my file with the faster C++ code I've used for comparison, however, it looks like many more languages do use a slow implementation instead of a fast one.
[3.cpp.txt](https://github.com/hanabi1224/Programming-Language-Benchmarks/files/12432293/3.cpp.txt)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.