Skip to content

My personal benchmark shows Rust interface is much slower than Python interface #2260

Answered by wjones127
ScottLinnn asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ScottLinnn. It might be informative to look at our compiler config for the Python binaries:

rustflags = ["-C", "target-cpu=haswell", "-C", "target-feature=+avx2,+fma,+f16c"]

lto = "thin"

We enable certain flags to get SIMD support built in. We also enable "thin" LTO. Both those can have significant impact.

Also I'm not sure how impactful this would be for write, but in tokio, you want to make sure you've enabled the multi-threaded runtime.

tokio = { version = "1.23", features = ["rt-multi-thread"]…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ScottLinnn
Comment options

Answer selected by ScottLinnn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants