Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The games are really awful. Look at NBody for example: http://benchmarksgame.alioth.debian.org/u64/performance.php?.... The fastest C program does it in 10 seconds. Rust is at 21. What's the difference? The C program uses vector intrinsics, while the Rust program is a straightforward implementation. The next four fastest C programs, which don't use vector intrinsics, are only a hair faster than the Rust program (20.x seconds).

The script kiddie's takeaway is: "well, C is still twice as fast as Rust!" The real professional's takeaway is: "wow, Rust manages to get within 4% of C while using iterators and higher order functions in the inner loop! Also: "Rust can do inline assembly too if that's what I need." https://gist.github.com/luqmana/5150557



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: