5 ms·
I found Java's to be quicker than Rust: Java: time java Test 117777800 0.60 real 0.52 user 0.12 sys Rust: time ./tes
by apta 6y ago
I found Java's to be quicker than Rust:
Java:
time java Test
117777800
0.60 real 0.52 user 0.12 sys
Rust:
time ./test
117777800
1.94 real 1.89 user 0.00 sys
- steveklabnik 6y agoWhat flags did you use with Rust?
- apta 6y agoBoth `-O` and `-C opt-level=3`. I'm guessing this is one of those high throughput scenarios where having a GC is quicker because it's able to defer deallocation until the end of the program.
- steveklabnik 6y ago-O is opt level 2, incidentally. Yeah, I think you’re right. Very interesting!