logoalt Hacker News

steveklabnikyesterday at 3:35 PM0 repliesview on HN

> Want it fast? Turn off the runtime checks by calling unsafe code.

You can do that for sure, but you can also sometimes write your code in a different way. https://davidlattimore.github.io/posts/2025/09/02/rustforge-... is an interesting collection of these.

> it doesn't read like the author has spent weeks in a profiler combing over machine code to optimize Rust code

It is true that this blog post was not intended to be a comprehensive comparison of the ways in which Rust and C differ in performance. It was meant to be a higher level discussion on the nature of the question itself, using a few examples to try and draw out interesting aspects of that comparison.