Skip to content

Instantly share code, notes, and snippets.

@gregorycollins
Created February 15, 2011 01:30
Show Gist options
  • Save gregorycollins/826935 to your computer and use it in GitHub Desktop.
Save gregorycollins/826935 to your computer and use it in GitHub Desktop.
Hashtable benchmark results feb 14 2011
ByteString keys between 8-32 characters long (ascii, hex digits). Test run on a Macbook Pro (2.53GHz Intel Core i5) running GHC 6.12.3.
$ ./dist/build/ucoll-benchmark/ucoll-benchmark +RTS -N -A4M
Results for Insert Performance
------------------------------------------------------------------------------
Data structure Data.Map
Input Sz Mean (secs) Stddev (secs) 95% (secs) Max (secs)
-------------- -------------- -------------- -------------- --------------
1000 636.9138 ns 46.88221 ns 723.7936 ns 735.8575 ns
2000 729.9197 ns 14.61240 ns 745.8818 ns 747.8488 ns
4000 884.3547 ns 19.52503 ns 907.0134 ns 911.4391 ns
8000 1.331085 us 130.1737 ns 1.495485 us 1.561356 us
16000 1.648590 us 27.28906 ns 1.682735 us 1.694358 us
32000 2.454534 us 55.28083 ns 2.523520 us 2.548966 us
64000 3.413014 us 99.47681 ns 3.537330 us 3.590544 us
128000 4.399932 us 30.94631 ns 4.435498 us 4.444781 us
256000 5.915491 us 137.7478 ns 6.050726 us 6.080202 us
512000 7.231336 us 144.4238 ns 7.365127 us 7.367256 us
Data structure Data.Hashtable
Input Sz Mean (secs) Stddev (secs) 95% (secs) Max (secs)
-------------- -------------- -------------- -------------- --------------
1000 595.0449 ns 45.54556 ns 644.5432 ns 749.6858 ns
2000 538.7438 ns 19.71379 ns 569.6905 ns 573.4456 ns
4000 624.0732 ns 22.76247 ns 652.4420 ns 662.7685 ns
8000 687.8737 ns 34.99825 ns 729.8860 ns 734.7289 ns
16000 916.3322 ns 68.60591 ns 1.002646 us 1.038677 us
32000 1.413834 us 20.84210 ns 1.438829 us 1.445930 us
64000 1.923679 us 8.005448 ns 1.929267 us 1.929404 us
128000 2.750432 us 27.42338 ns 2.783821 us 2.795710 us
256000 3.531881 us 29.27652 ns 3.561408 us 3.567577 us
512000 4.149965 us 26.18384 ns 4.173946 us 4.174968 us
Data structure Data.BasicHashTable
Input Sz Mean (secs) Stddev (secs) 95% (secs) Max (secs)
-------------- -------------- -------------- -------------- --------------
1000 109.4580 ns 11.11746 ns 132.8970 ns 155.7851 ns
2000 105.0833 ns 8.779389 ns 121.5232 ns 142.5040 ns
4000 103.3193 ns 5.522685 ns 112.3047 ns 121.6775 ns
8000 119.1818 ns 7.558275 ns 132.7279 ns 133.4968 ns
16000 127.6316 ns 5.522417 ns 134.7163 ns 137.1862 ns
32000 136.2980 ns 2.867721 ns 139.8877 ns 140.8414 ns
64000 331.3877 ns 10.97508 ns 340.7278 ns 342.4190 ns
128000 430.2334 ns 8.406532 ns 441.0272 ns 444.3050 ns
256000 552.2689 ns 24.30324 ns 583.1871 ns 595.3865 ns
512000 754.8706 ns 18.07037 ns 777.9912 ns 784.6348 ns
Data structure Data.LinearHashTable
Input Sz Mean (secs) Stddev (secs) 95% (secs) Max (secs)
-------------- -------------- -------------- -------------- --------------
1000 190.2622 ns 13.02542 ns 197.0316 ns 280.7165 ns
2000 206.0690 ns 13.25466 ns 229.8904 ns 253.9647 ns
4000 215.5896 ns 24.17854 ns 255.7522 ns 281.0007 ns
8000 269.4153 ns 40.47159 ns 325.0691 ns 345.8384 ns
16000 303.3014 ns 35.38184 ns 348.4064 ns 365.8594 ns
32000 667.3709 ns 15.20461 ns 683.3535 ns 685.3373 ns
64000 623.8506 ns 53.95491 ns 693.4783 ns 713.0295 ns
128000 898.7349 ns 29.54637 ns 936.9681 ns 949.1246 ns
256000 1.309613 us 48.54193 ns 1.358441 us 1.367531 us
512000 1.643168 us 10.19951 ns 1.653931 us 1.655845 us
Results for Lookup Performance
------------------------------------------------------------------------------
Data structure Data.Map
Input Sz Mean (secs) Stddev (secs) 95% (secs) Max (secs)
-------------- -------------- -------------- -------------- --------------
1000 407.9491 ns 29.40432 ns 427.6338 ns 607.3537 ns
2000 453.9104 ns 48.31074 ns 558.5463 ns 628.8798 ns
4000 556.0000 ns 66.47949 ns 689.0730 ns 704.3735 ns
8000 614.3876 ns 18.96325 ns 642.5091 ns 657.7202 ns
16000 777.8857 ns 22.17684 ns 801.3163 ns 803.9389 ns
32000 1.067133 us 124.1851 ns 1.212015 us 1.223232 us
64000 1.392985 us 16.90002 ns 1.414392 us 1.421993 us
128000 1.769966 us 40.79705 ns 1.819688 us 1.833434 us
256000 2.230332 us 24.30307 ns 2.249045 us 2.250520 us
512000 2.738540 us 26.94482 ns 2.773059 us 2.782909 us
Data structure Data.Hashtable
Input Sz Mean (secs) Stddev (secs) 95% (secs) Max (secs)
-------------- -------------- -------------- -------------- --------------
1000 316.3599 ns 31.59749 ns 399.4527 ns 457.6269 ns
2000 299.3377 ns 22.24249 ns 320.6046 ns 416.6873 ns
4000 277.0831 ns 14.48863 ns 303.3534 ns 314.4399 ns
8000 347.1879 ns 20.05884 ns 379.8582 ns 403.6852 ns
16000 456.9803 ns 41.93019 ns 512.6808 ns 528.9529 ns
32000 650.8039 ns 73.11931 ns 743.6978 ns 771.1010 ns
64000 1.477447 us 72.46262 ns 1.571398 us 1.601806 us
128000 1.506620 us 51.37380 ns 1.568246 us 1.577495 us
256000 1.584175 us 31.00870 ns 1.609365 us 1.612538 us
512000 1.787840 us 10.28227 ns 1.797490 us 1.798955 us
Data structure Data.BasicHashTable
Input Sz Mean (secs) Stddev (secs) 95% (secs) Max (secs)
-------------- -------------- -------------- -------------- --------------
1000 106.9600 ns 6.808729 ns 111.4431 ns 171.5246 ns
2000 111.0921 ns 12.17061 ns 130.5373 ns 183.7523 ns
4000 108.6955 ns 11.70146 ns 133.2656 ns 167.8125 ns
8000 127.5352 ns 13.16529 ns 151.8973 ns 170.6906 ns
16000 178.0833 ns 27.83908 ns 230.9028 ns 248.4534 ns
32000 176.2296 ns 11.39483 ns 192.8950 ns 200.2226 ns
64000 173.3103 ns 9.438504 ns 185.3664 ns 189.2426 ns
128000 285.1855 ns 41.81564 ns 333.5530 ns 339.7752 ns
256000 375.6901 ns 10.56199 ns 389.1917 ns 393.7794 ns
512000 410.7283 ns 6.999966 ns 418.9904 ns 421.6737 ns
Data structure Data.LinearHashTable
Input Sz Mean (secs) Stddev (secs) 95% (secs) Max (secs)
-------------- -------------- -------------- -------------- --------------
1000 312.0111 ns 27.39425 ns 354.5347 ns 527.2451 ns
2000 292.3575 ns 32.23444 ns 331.6315 ns 469.6162 ns
4000 291.6411 ns 20.56008 ns 328.4828 ns 366.8920 ns
8000 371.6902 ns 22.76239 ns 408.1555 ns 416.9174 ns
16000 468.9658 ns 43.62197 ns 528.4701 ns 554.3444 ns
32000 536.9948 ns 19.09506 ns 557.5636 ns 558.9234 ns
64000 827.6456 ns 67.58857 ns 915.0130 ns 943.7406 ns
128000 1.009241 us 26.06843 ns 1.039396 us 1.043259 us
256000 1.130488 us 23.13271 ns 1.160402 us 1.167990 us
512000 1.392875 us 32.12852 ns 1.432013 us 1.437631 us
Larger sizes (omitting Data.Map and Data.LinearHashTable for brevity):
Results for Insert Performance
------------------------------------------------------------------------------
Data structure Data.Hashtable
Input Sz Mean (secs) Stddev (secs) 95% (secs) Max (secs)
-------------- -------------- -------------- -------------- --------------
1024000 4.743461 us 151.7502 ns 4.888624 us 4.895704 us
2048000 5.465088 us 169.3683 ns 5.643596 us 5.643899 us
Data structure Data.BasicHashTable
Input Sz Mean (secs) Stddev (secs) 95% (secs) Max (secs)
-------------- -------------- -------------- -------------- --------------
1024000 1.058103 us 82.90594 ns 1.149796 us 1.161000 us
2048000 1.455490 us 27.22922 ns 1.488956 us 1.495560 us
Results for Lookup Performance
------------------------------------------------------------------------------
Data structure Data.Hashtable
Input Sz Mean (secs) Stddev (secs) 95% (secs) Max (secs)
-------------- -------------- -------------- -------------- --------------
1024000 2.229095 us 98.16930 ns 2.317766 us 2.336874 us
2048000 2.486725 us 94.90731 ns 2.603436 us 2.636963 us
Data structure Data.BasicHashTable
Input Sz Mean (secs) Stddev (secs) 95% (secs) Max (secs)
-------------- -------------- -------------- -------------- --------------
1024000 496.3167 ns 33.99926 ns 538.7576 ns 553.8548 ns
2048000 540.5246 ns 5.868658 ns 547.9219 ns 550.9050 ns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment