Python big integer vs. Julia big integer arithmetic

You’re not measuring the integer arithmetic. Most of the time is startup of julia.

To measure the integer arithmetic, use e.g. the package BenchmarkTools.

julia> using BenchmarkTools
julia> @btime powermod(3, 100000000000, 102)

I get 184 nanoseconds. How to do such a timing in python, I don’t know.

5 Likes