Created
January 26, 2018 12:22
-
-
Save Tinche/f0fde284aa6bac69579b74df95cdef20 to your computer and use it in GitHub Desktop.
This file contains 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
> pyperf timeit -g -s "i = [(e, 1) for e in range(1000)]" "[e[0] for e in i]" | |
..................... | |
39.5 us: 1 ########### | |
39.6 us: 2 ####################### | |
39.7 us: 4 ############################################# | |
39.9 us: 6 #################################################################### | |
40.0 us: 6 #################################################################### | |
40.1 us: 7 ############################################################################### | |
40.2 us: 6 #################################################################### | |
40.3 us: 6 #################################################################### | |
40.4 us: 3 ################################## | |
40.5 us: 3 ################################## | |
40.6 us: 4 ############################################# | |
40.7 us: 3 ################################## | |
40.8 us: 3 ################################## | |
40.9 us: 0 | | |
41.0 us: 1 ########### | |
41.2 us: 3 ################################## | |
41.3 us: 0 | | |
41.4 us: 1 ########### | |
41.5 us: 0 | | |
41.6 us: 0 | | |
41.7 us: 1 ########### | |
Mean +- std dev: 40.3 us +- 0.5 us | |
> pyperf timeit -g -s "i = [(e, 1) for e in range(1000)]" "[e for (e,_) in i]" | |
..................... | |
32.0 us: 4 ################################### | |
32.2 us: 5 ############################################ | |
32.3 us: 9 ############################################################################### | |
32.4 us: 9 ############################################################################### | |
32.5 us: 4 ################################### | |
32.7 us: 8 ###################################################################### | |
32.8 us: 6 ##################################################### | |
32.9 us: 8 ###################################################################### | |
33.0 us: 1 ######### | |
33.2 us: 1 ######### | |
33.3 us: 2 ################## | |
33.4 us: 0 | | |
33.6 us: 0 | | |
33.7 us: 0 | | |
33.8 us: 0 | | |
33.9 us: 1 ######### | |
34.1 us: 0 | | |
34.2 us: 1 ######### | |
34.3 us: 0 | | |
34.5 us: 0 | | |
34.6 us: 1 ######### | |
Mean +- std dev: 32.7 us +- 0.5 us |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment