Code to calculate the execution time in seconds and nanoseconds #242
Replies: 4 comments 6 replies
-
Thank you! That really helped! I couldn't turn that into a decorator so, at least if someone wants to "wrap" a function in the time being:
|
Beta Was this translation helpful? Give feedback.
-
I wrote an |
Beta Was this translation helpful? Give feedback.
-
Note there is already a |
Beta Was this translation helpful? Give feedback.
-
Am I wrong to think that a fair test would use the same function to test the time of both? Or am I silly to think that there would be a function that could work the same in both? |
Beta Was this translation helpful? Give feedback.
-
I've refined the code to calculate the execution time in both seconds and nanoseconds:
For mojo:
For python:
So can we more easily to compare the speed of native mojo code to the speed of python code
Beta Was this translation helpful? Give feedback.
All reactions