4 ms·
Yeah the performance comparison doesn't look too great yet: https://rustpython.github.io/benchmarks https://rustpython.github.io/benchmarks Currently it's more
by singularity2001 4y ago
Yeah the performance comparison doesn't look too great yet:
https://rustpython.github.io/benchmarks https://rustpython.github.io/benchmarks
Currently it's more about clarity and a nice clean code base, but it can only get faster from here
- andai 4y agoAny idea where the slowness is coming from?
- intrepidhero 4y agoI've been playing with making a rust interpreter and reading other people's work. Here's an interesting blog post (not mine) on making a interpreter in rust match the speed of a c implementation. It seems folks often have to resort to unsafe rust to get the performance they want. I don't claim to fully understand that and am looking for more information myself. http://www.dannyvankooten.com/blog/2022/rewriting-interpreter-rust/ http://www.dannyvankooten.com/blog/2022/rewriting-interprete...
- xiphias2 4y agoWith webservers we already saw that the way to make new things fast in Rust is to use lots of unsafe Rust when needed, optimize the code, and after that think about the right abstractions that minimize the unsafe code surface.
- tinco 4y agoWell there's no production class garbage collector in Rust yet, so in RustPython they're just using Rc's I think. That's one place to start. The other will probably be the quality of the JIT.
- youknowone 4y agoRustPython didn't adapt the optimization designs yet. One of the current major goal is this optimization: https://github.com/RustPython/RustPython/issues/3244 https://github.com/RustPython/RustPython/issues/3244 RustPython even cannot run `1+1` without calling `int.__add__` yet. And it is working on https://github.com/RustPython/RustPython/pull/4615 https://github.com/RustPython/RustPython/pull/4615 So it still has long way to go not C vs Rust but from the design level.
- patrick451 4y agoThis seems like a very optimistic take. For some reason, it made me think about spectre and heartbleed and how my computer just kept getting slower a couple years back.