News for hackers. Stuff that matters.
Re:Why is Rust slightly slower than C? by fluffything on Thursday September 12, 2019 @05:58AM (#20949744)
> I don't know enough about Rust to understand what its exact "runtime" is like, but I'd bet it's not exactly like C.

It is.

> Rust is strongly-typed, is it not?

Yes.

> Does it do run-time type-checking?

No.

> Exception handling in particular requires a non-negligible amount of run-time overhead and may account for a significant proportion of the difference between the performance of Rust and C.

Rust does not have exceptions, it has panics (fatal errors). It is correct for a panic to abort the program. You can provide an user-defined panic run-time that does whatever you want (unwinding, aborting, looping forever, `ud2`, etc.).

There are no comments on this comment yet.