Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Rust is now faster than C

Name: Anonymous 2017-02-21 18:14

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=knucleotide

How can this be? Since C is as fast as assembly, does this mean Rust does some microcode optimilzation under the hood?

Name: Anonymous 2017-02-22 2:26

>>10
That code dereferences a NULL pointer, which is just plain NOT ALLOWED. In most environments it results in an immediate program crash. You say that the compiler should do what the programmer says, but this is a terrible example of that, it's clearly obvious that the programmer made a horrendous mistake. This code IS an exploitable security vulnerability, but not BECAUSE the NULL check is optimized away - it's because before the NULL check is even reached, the program has ALREADY entered an undefined state. That a pointer dereference preceding a NULL check made it into kernel code indicates a flaw in coding practices, not a flaw in the compiler.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List