I recently ported some very simple combinatorial code from Python to Rust. I was expecting around 100x speed up. I was surprised when the code ended running only 14 times faster.
Parts of Python are implemented in C. For example the standard for loop using `range`. So when comparing Python's performance with other languages using just one simple benchmark can lead to unexpected results depending on what the program does.
Did you use python specific functions like list comprehensions, or "classic" for/while loops? Because I've found the former to be surprisingly fast, while naive for loops are incredibly slow in python.