Comment

Comment by fluffy87

Note that Rust also traps on integer overflow, and it is trivial to „hack“ the compiler to disable this, and many have done so.

While on this microbenchmark you see a 3x slowdown with the LLVM backend, on large Rust projects like servo, Firefox, the rust compiler, etc. the slowdown is not even measurable.

Also, Rust provides you with unsafe intrinsics to opt-out of trapping in the particular line of code in which it causes an issue.

parent fluffy87 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton