Live data from Hacker News

Speed up your Python using Rust

developers.redhat.com

1–10 of 102 posts

Re: Speed up your Python using Rust

#3

What's the advantage of doing this over using cython or pypy?

More perfs since you are going lower level. You are not limited by cython types or pypy git warming up. You can use the full range of c libs AND rust libs. You benefit from the cargo build tools.

Re: Speed up your Python using Rust

#4
post #3

What's the advantage of doing this over using cython or pypy?

More perfs since you are going lower level. You are not limited by cython types or pypy git warming up. You can use the full range of c libs AND rust libs. You benefit from the cargo build tools.

I'm not sure how different this is with Cython since you can also write C/C++ code with it, and hence use any C/C++ libraries. I say that the benefit offered by the example is more of bringing the Rust ecosystem to Python than solving performance issues.

Re: Speed up your Python using Rust

#5
post #4
post #3

Earlier quoted context omitted.

More perfs since you are going lower level. You are not limited by cython types or pypy git warming up. You can use the full range of c libs AND rust libs. You benefit from the cargo build tools.

I'm not sure how different this is with Cython since you can also write C/C++ code with it, and hence use any C/C++ libraries. I say that the benefit offered by the example is more of bringing the Rust ecosystem to Python than solving performance issues.

Well, with cython, either you write python compiled to C, and you won't match rust perf nor types, or you write c/c++ and bind it to python, and you won't match rust safetiness.

Re: Speed up your Python using Rust

#6
post #4
post #3

Earlier quoted context omitted.

More perfs since you are going lower level. You are not limited by cython types or pypy git warming up. You can use the full range of c libs AND rust libs. You benefit from the cargo build tools.

I'm not sure how different this is with Cython since you can also write C/C++ code with it, and hence use any C/C++ libraries. I say that the benefit offered by the example is more of bringing the Rust ecosystem to Python than solving performance issues.

Total layman here, but I thought one would use Rust because it’s easier to write “safe” code with it than C/C++, while maintaining an equivalent low-level speed advantage.

Re: Speed up your Python using Rust

#7
post #6
post #4

Earlier quoted context omitted.

I'm not sure how different this is with Cython since you can also write C/C++ code with it, and hence use any C/C++ libraries. I say that the benefit offered by the example is more of bringing the Rust ecosystem to Python than solving performance issues.

Total layman here, but I thought one would use Rust because it’s easier to write “safe” code with it than C/C++, while maintaining an equivalent low-level speed advantage.

you should also quote "easier" ;)

it's certainly easier once you sacrifice a goat to the compiler to stop insulting you and your mother.

disclaimer: i love rust

Re: Speed up your Python using Rust

#9
post #7
post #6

Earlier quoted context omitted.

Total layman here, but I thought one would use Rust because it’s easier to write “safe” code with it than C/C++, while maintaining an equivalent low-level speed advantage.

you should also quote "easier" ;) it's certainly easier once you sacrifice a goat to the compiler to stop insulting you and your mother. disclaimer: i love rust

Well it's better than your client insulting you and your mother because your software killed their goat by mistake.

Re: Speed up your Python using Rust

#10
post #5
post #4

Earlier quoted context omitted.

I'm not sure how different this is with Cython since you can also write C/C++ code with it, and hence use any C/C++ libraries. I say that the benefit offered by the example is more of bringing the Rust ecosystem to Python than solving performance issues.

Well, with cython, either you write python compiled to C, and you won't match rust perf nor types, or you write c/c++ and bind it to python, and you won't match rust safetiness.

why would rust have better performance than cython? cython is as fast as C
Post reply on HN