Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Conversation

@AhmadUCL
Copy link

@AhmadUCL AhmadUCL commented Dec 17, 2020

Original code

$ python -m timeit -n 100 -r 5 -s "from calc_pi import calculate_pi_timeit" "calculate_pi_timeit(10_000)()"
100 loops, best of 5: 14.3 msec per loop

Updated code (using numpy)

$ python -m timeit -n 100 -r 5 -s "from calc_pi_np import calculate_pi_timeit" "calculate_pi_timeit(10_000)()"
100 loops, best of 5: 883 usec per loop

Numpy version is much faster but for whatever reason line 63 gives me an error in the numpy version so I had to comment it out

Measuring performance and using numpy #185

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant