Benchmarks: Julia vs Python+Numba

Just sharing -

I started running some reality checks. I hope experiments like this would re-enforce our assessment about Julia’s greatness in performance, as compared to the Python+Numba ecosystem.

Only one notebook is posted so far:
https://github.com/tk3369/JuliaVsPythonNumba

If anyone is interested in running additional reality checks, there are quite a few examples at this repo. Let me know if you want to collaborate so we don’t duplicate any efforts.

https://github.com/ContinuumIO/numbapro-examples

Some would call these things “benchmarks” :smile:

I don’t understand why you code the functions as loops. Unless I missed something, they just vectorize a Black-Scholes. You could just broadcast, which would (I expect) do the same thing, but be more idiomatic.

The code is intentionally made to be exactly the same as in Python’s implementation :wink:

The point that I’m trying to prove -
Without additional effort in code optimization, a Julia program should run faster by default. If the code sucks (like in this case) then the Python version should equally suck and therefore it would still be a fair comparison.

I did not say that the code does “sucks”, it is just that one could write it differently.

Also, if I remember correctly, you can get call from the put prices from parity, or vice versa. I would just return either (for both Python and Julia, to be consistent). YMMV.

IHaha… I thought that might be a strong word when I wrote the post but that’s how Americans describe these things (I hear them all the time from my kids and got influenced :rofl:)