Hacker News new | ask | show | jobs
by lispit 3883 days ago
No perceptible performance hit on a modern machine? Absolutely. I'm sure you can run 100 copies of Doom simultaneously in Javascript or whatever.

No perceptible performance hit on a 486? Somehow, I don't think that the 486 is an especially important target for the LLVM or Rust developers (though such chips are used in embedded applications to this day).

But the real reason that the comparison makes no sense is that the bulk of the processing time (but not the bulk of the code, mind you) is spent in those tightly optimized assembly loops. Either you keep it as such and it's not really much of a battle between C and Rust any more, or you rewrite the critical sections in Rust and you'd lose as hard or more as if you wrote them in C.

1 comments

Weirdly the i586 is the problematic one. 3, 4, 6, 7, and 8 all apparently work fine.

https://users.rust-lang.org/t/i586-support-illegal-hardware-...

That bug just looks like a glitch with ISA support in the generated code. It's trivially fixable I'm sure, and not really relevant to the subject of optimized assembly.