fusion-engineering / inline-python

Inline Python code directly in your Rust code
https://docs.rs/inline-python
BSD 2-Clause "Simplified" License
1.15k stars 37 forks source link

Add performance benchmark #56

Open pickfire opened 1 year ago

pickfire commented 1 year ago

Some says that calling python from rust is faster than running python code directly. https://users.rust-lang.org/t/why-calling-python-from-rust-is-faster-than-python/39789

Even though it's not a fair comparison, maybe we can see how much faster is it?

m-ou-se commented 1 year ago

It basically comes down to just the difference between a .py and .pyc file, since inline-python compiles the Python code to Python bytecode at (Rust) compile time. There is probably plenty of information already out there about .py vs .pyc files.

pickfire commented 1 year ago

Should we mention this in the readme?