GCC-4.9 ========================================================== baseline size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.14417 0.15706 0.20669 0.25639 1000 0.13875 0.16019 0.22043 0.25684 10000 0.20475 0.21161 0.34069 0.37477 100000 0.28632 0.29629 0.60793 0.50190 1000000 0.56773 0.55806 1.03753 1.85822 nounicode size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.16724 0.15839 0.22093 0.25693 1000 0.16478 0.15789 0.23555 0.25146 10000 0.22012 0.20870 0.35622 0.36946 100000 0.30281 0.29336 0.64075 0.50131 1000000 0.59918 0.55693 1.08613 1.49776 unicode inside size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.16337 0.18068 0.22129 0.30555 1000 0.17301 0.19471 0.24836 0.32664 10000 0.23315 0.24274 0.38500 0.45159 100000 0.33157 0.34553 0.68185 0.62239 1000000 0.65420 0.62039 1.26021 2.33050 real 11m56.755s user 11m44.554s sys 0m12.123s ~/cpython $ time ./run.sh baseline size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.14445 0.15896 0.20432 0.25552 1000 0.14321 0.15836 0.22142 0.25395 10000 0.20262 0.21105 0.34343 0.37067 100000 0.28702 0.29674 0.62023 0.49884 1000000 0.56471 0.55821 1.08690 1.65626 nounicode size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.16867 0.15899 0.21644 0.25214 1000 0.16390 0.15755 0.23457 0.24954 10000 0.21993 0.20898 0.35564 0.36460 100000 0.30354 0.29299 0.63231 0.47981 1000000 0.59980 0.55064 1.11629 1.79608 unicode inside size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.15142 0.17194 0.21561 0.27220 1000 0.14835 0.17203 0.23030 0.26834 10000 0.20744 0.21805 0.35386 0.38129 100000 0.28578 0.30149 0.63017 0.51309 1000000 0.55643 0.55497 1.11937 2.10930 real 11m56.755s user 11m44.554s sys 0m12.123s baseline size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.14230 0.16043 0.20691 0.26027 1000 0.13850 0.15853 0.22021 0.25408 10000 0.20447 0.20965 0.33922 0.37347 100000 0.28582 0.29890 0.61671 0.49948 1000000 0.57854 0.55753 1.08555 1.84542 nounicode size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.16858 0.16044 0.22140 0.25540 1000 0.16483 0.15703 0.23437 0.25223 10000 0.21953 0.20899 0.35581 0.36725 100000 0.30219 0.29264 0.64175 0.49131 1000000 0.60101 0.55122 1.14192 1.90913 unicode inside size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.14993 0.16896 0.21322 0.26964 1000 0.14667 0.17183 0.23160 0.26704 10000 0.20996 0.21800 0.35281 0.38184 100000 0.28505 0.29979 0.63666 0.51713 1000000 0.55303 0.55850 1.11942 1.71748 real 11m17.655s user 11m5.488s sys 0m12.102s ~/cpython $ time ./run.sh baseline size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.14121 0.16342 0.20816 0.25681 1000 0.13989 0.15838 0.22091 0.25388 10000 0.20496 0.21357 0.34329 0.37253 100000 0.28546 0.29699 0.62314 0.50180 1000000 0.56577 0.56292 1.08729 1.82485 nounicode size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.16939 0.16200 0.22384 0.25354 1000 0.16400 0.15705 0.23615 0.25274 10000 0.22014 0.21105 0.35724 0.36299 100000 0.30170 0.29329 0.63570 0.49694 1000000 0.60266 0.55276 1.09800 1.75659 unicode inside size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.14765 0.16754 0.21609 0.27417 1000 0.14988 0.17194 0.22933 0.26929 10000 0.20826 0.22060 0.35230 0.38020 100000 0.28801 0.29807 0.63387 0.51426 1000000 0.55401 0.57179 1.13909 2.09459 real 11m16.178s user 11m3.985s sys 0m12.090s CLANG ========================================================== baseline size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.16098 0.17956 0.21262 0.30219 1000 0.15869 0.17552 0.22376 0.28464 10000 0.21236 0.22316 0.35486 0.41611 100000 0.30941 0.31878 0.62413 0.57632 1000000 0.62404 0.59810 1.11416 2.25340 nounicode size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.18775 0.17927 0.23839 0.29772 1000 0.18793 0.18314 0.25112 0.29358 10000 0.22890 0.22051 0.36077 0.41517 100000 0.32131 0.31727 0.64871 0.57065 1000000 0.63932 0.59060 1.13295 2.25323 unicode inside size dup words dup ints uniq words uniq ints ---------- ----------- ----------- ----------- ----------- 100 0.15980 0.18932 0.21192 0.30660 1000 0.15534 0.17895 0.23069 0.29763 10000 0.21152 0.22350 0.36449 0.42323 100000 0.31633 0.31992 0.66621 0.58119 1000000 0.63359 0.59668 1.24193 2.26399 real 13m15.765s user 13m3.402s sys 0m12.279s