Hacker News new | past | comments | ask | show | jobs | submit login

C has 1.64, even better, I’ve intentionally omitted that, but that is the reference for cases “it doesn’t have to be new fashion but has to be fast.”



Yes, but writing C is a completely different, and much more onerous experience. You have no sensible strings or hashmaps in the standard library, and using external libraries is a massive pain. That's not even to mention Undefined Behaviour and memory safety issues.

For most data-munging programs, python, node, java, and rust code will be roughly similar (Java and Rust will make you annotate types). I've been amazed at the performance you can get from Rust code that looks practically identical to the equivalent JavaScript.


See the C source I don’t find it less readable than Rust version.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...


To be honest I find both the fastest C and Rust answers ("C gcc #6" @ 1.64s and "Rust #6" @ 1.70s) highly unreadable.

For me, "Rust #5" @ 1.98s is the first readable solution in the list, and seems comparable (code wise) with the Java, Python, etc implementations. ("C++ g++ #6" is also quite reasonable, but that's C++, not C).


How does "unreadable" relate to source code size for you?

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: