2 ms·
I used to benchmark using fibonacci, but the recursive method is just awful because it does a lot of function calls and you're essentially benchmarking that. Th
by petre 8y ago
I used to benchmark using fibonacci, but the recursive method is just awful because it does a lot of function calls and you're essentially benchmarking that. Then I switched to finding primes using the Sieve of Sundaram. It uses arrays, hashes/maps/dicts and two loops. Also wastes a lot of memory if you don't split your search domain into ranges. The surprise was that Go and D (in that order) turned out to be faster than Rust mainly due to Rust's HashMap SipHash algorithm. I gave up trying to use other hash libraries (SeaHash specifically) that are not part of the standard lib, because it was quite frustrating compared to D.
- igouy 8y ago> gave up trying to use other hash libraries fwiw a Rust k-nucleotide program using indexmap: https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/knucleotide-rust-4.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...