|
|
|
|
|
by dbaupp
3660 days ago
|
|
That comparison is misleading for exactly the reasons others have said: the algorithms differ, as can be easily seen in their very different data structures. A naive, line-by-line port of your fast variant to safe Rust (which I unfortunately am not allowed to share, but didn't require much thinking nor much time), without bothering with prefetching, gives me numbers more like: Rust-fast: 533
C-fast: 685
I'm using --release for Rust (so no CPU-specific optimisation), and the same invocation as you for C. Everything except my editor is closed when benchmarking, and I'm on a Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz. |
|