Hacker News new | ask | show | jobs
by baobun 167 days ago
Title reminded me of something completely unrelated:

FFI overhead is not to be neglected sometimes. I've seen cases where replacing a python or js lib with an in isolation much faster native Rust or C lib with bindings had the end result being a decrease in real-world performance due to it being in a hot path or loop and the overhead being more significant than the savings were. There is no substitute for real-world benchmarks.

1 comments

(Author here) yes! I also wrote about this (specifically in Python->Rust FFI) in another article:

https://ohadravid.github.io/posts/2023-03-rusty-python/#v2--...