Comment

Comment by f_devd

I don't think the rust team would claim writing idiomatic safe rust code is always zero-overhead. Indexing into an array adds bounds checks which takes non-zero time. So by default you trade-off safety for performance to some degree; but this can be bypassed if needed, that's why you have unsafe.

For completeness, it's 0.1x the size with 1.20x the runtime, so these are not just language differences

parent f_devd 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton