4 ms·
I agree with all that, particularly the bit about the c ffi call. It's more relevant to compare Rust with C and C++, as Rust is a language that could reasonabl
by delhanty 9y ago
I agree with all that, particularly the bit about the c ffi call. It's more relevant to compare Rust with C and C++, as Rust is a language that could reasonably display C for the ffi call.
But then remember that @wyager is claiming
>80% as fast as hand-optimized C for only 10% of the effort of hand-optimized C
If it's really only 10% of the effort then one shouldn't really have "to work on it" to get semi-decent performance.
A more modest claim of say:
50% as fast as hand-optimized C for only 20% of the effort of hand-optimized C
would have been more credible and still a big win for many use cases.
- Tarean 9y agoTried my hand at the knucleotide[1] one. Lifted the algorithm from the fastest rust solution. As optimization I dropped some Unpack pragmas and strictness annotations, used Data.Hashtable.Cuckoo for in-place updating hash tables because that seemed necessary for the task, and added naive parallelization via let outputs = map (exec content) tasks `using` parList rseq That got around 24 seconds which seems acceptable for a fairly straightforward solution that is around half the size of the rust one I copied. Might try to optimize later. [1]: http://benchmarksgame.alioth.debian.org/u64q/knucleotide.html http://benchmarksgame.alioth.debian.org/u64q/knucleotide.htm...
- igouy 9y agohttp://benchmarksgame.alioth.debian.org/play.html http://benchmarksgame.alioth.debian.org/play.html