News for hackers. Stuff that matters.
Re:A Python Interpreter Written in Rust by Thaxll on Saturday February 02, 2019 @04:32PM (#19065865)
Rust is definitely not as fast as C, it's most likely not as fast as C++
Re:A Python Interpreter Written in Rust by dralley on Saturday February 02, 2019 @05:06PM (#19066040)
It's within 5-10% on average, sometimes faster, usually a little slower, very rarely slower by much. The person you're responding to said "approximately". I feel like this is needless pedantry.

Rust also allows you to make architectural decisions in the name of performance that would be completely unmaintainable in C. See: the Servo project.

Re:A Python Interpreter Written in Rust by arcticbull on Saturday February 02, 2019 @05:33PM (#19066222)
Further, it should be possible for Rust to eventually reach a state where it's faster than C because of the lack of pointer aliasing. This opens up a whole host of optimization opportunities, allowing it to get closer in performance to Fortran (which is intrinsically the fastest of the bunch).
Re:A Python Interpreter Written in Rust by dodobirdlord on Saturday February 02, 2019 @06:25PM (#19066550)
Indeed, it's available but currently disabled due to a bug in LLVM that can cause incorrect code generation.

https://github.com/rust-lang/rust/issues/54878

This is not the first time it has been disabled due to an LLVM bug.

https://github.com/rust-lang/rust/issues/31681

Re:A Python Interpreter Written in Rust by dodobirdlord on Saturday February 02, 2019 @05:55PM (#19066346)
What makes you say that? Optimized machine code is for the most part optimized machine code, and unsurprisingly benchmarks tend to come down about even. The bunchmarks game currently has them down as

C vs. Rust: 6 wins for C, one draw, 3 wins for Rust

C++ vs. Rust: 5 wins for C++, two draws, 3 wins for Rust

The wins one way or another are also not by particularly large margins.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

This may go on to shift marginally in Rust's favor once a soundness bug related to non-aliasing of references is fixed in LLVM and the compiler can safely leverage some guarantees that Rust provides that C and C++ cannot.

Re:A Python Interpreter Written in Rust by pjmlp on Sunday February 03, 2019 @04:11AM (#19068552)
Any update on that bug being fixed?