Created
November 15, 2017 16:32
-
-
Save dansondergaard/63d8febdf99309f571a9ae5ec686b980 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In [4]: %timeit int(1001) in range(1000) | |
| 558 ns ± 6.22 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) | |
| In [5]: %timeit int(100001) in range(100000) | |
| 567 ns ± 14.1 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) | |
| In [6]: %timeit int(10000001) in range(10000000) | |
| 561 ns ± 8.6 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) | |
| In [7]: %timeit int(1000000001) in range(1000000000) | |
| 558 ns ± 6.59 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) | |
| In [8]: %timeit int(100000000001) in range(100000000000) | |
| 583 ns ± 4.33 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment