Skip to content

Instantly share code, notes, and snippets.

@Dalgona
Created March 17, 2016 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dalgona/bd55d3a9e7347106b0ee to your computer and use it in GitHub Desktop.
Save Dalgona/bd55d3a9e7347106b0ee to your computer and use it in GitHub Desktop.
sugar test result
% clang++ --std=c++11 test.cpp
% ./a.out
*** BEGIN PERFORMANCE TEST ***
for range vrange1 (accessing 100000000 32-bit integers)
0.17850 0.80152 3.09291
0.17856 0.80029 3.07041
0.17856 0.80097 3.06703
0.18180 0.79947 3.06657
0.18012 0.80238 3.07114
0.17954 0.79954 3.10851
0.17964 0.80772 3.10094
0.18096 0.81371 3.09316
0.18019 0.79921 3.07416
0.18178 0.80290 3.09085
classic for enumerate (accessing 100000000 32-bit integers)
0.233579689 0.987390785
0.233180495 0.989199269
0.238163654 0.987495265
0.231758439 0.995327128
0.232554754 0.988983286
0.236838528 0.993830448
0.235852582 0.991416013
0.232846016 0.992509583
0.237909224 0.990673446
0.235632554 0.997830458
*** END PERFORMANCE TEST ***
% clang++ --std=c++11 -O3 test.cpp
% ./a.out
*** BEGIN PERFORMANCE TEST ***
for range vrange1 (accessing 100000000 32-bit integers)
0.02517 0.02586 0.54711
0.02521 0.02616 0.52369
0.02514 0.02620 0.52966
0.02523 0.02592 0.52420
0.02513 0.02638 0.51547
0.02615 0.02617 0.51703
0.02515 0.02626 0.51170
0.02518 0.02617 0.52112
0.02510 0.02609 0.52130
0.02510 0.02585 0.51404
classic for enumerate (accessing 100000000 32-bit integers)
0.058713713 0.061608648
0.059326223 0.060892332
0.061075810 0.055786600
0.056982631 0.055656344
0.058693140 0.061760506
0.063022932 0.061605977
0.059518073 0.055740307
0.056770167 0.056097708
0.057241775 0.055750556
0.056974407 0.055817801
*** END PERFORMANCE TEST ***
%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment