-
-
Notifications
You must be signed in to change notification settings - Fork 5
Replace %time
with %timeit
#206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks @HumphreyYang and thanks @shizejin for reporting! (@HumphreyYang always puts in great PRs, so the whole issue is clear at a glance. This is super valuable to me.) I was trying to avoid But it seems this is causing problems. @HumphreyYang , let's do as you recommend. Would you mind to put the fix in? |
Many thanks @jstac for the suggestion! I will submit a FIX for this.
I think this is a very valid concern as well. The reader sees that the number is small but notices that the code takes longer to run. I will add a brief note below the first use of Given this concern, should we change I think the issue is less noticeable when the runtime differences are large. |
I agree @HumphreyYang . Let's change it only in the introductory lecture and with the note that you mention. Thanks. |
Fixed by using |
@shizejin reported that there is a misleading comparison in the introduction to JAX:
It might relates to the timing magic we used.
%time
is sometimes influenced other factors such as garbage collections, workload etc:https://stackoverflow.com/questions/17579357/time-time-vs-timeit-timeit
I think
%timeit
might be a more robust way to compare the results, which is also used in JAX documents:https://docs.jax.dev/en/latest/quickstart.html
The result under

%timeit
can be found here:The text was updated successfully, but these errors were encountered: