Skip to content

Instantly share code, notes, and snippets.

@arthurprs
Last active September 29, 2016 13:47
Show Gist options
  • Save arthurprs/9f28847dceee86bd5cfffcd30d9cd6cc to your computer and use it in GitHub Desktop.
Save arthurprs/9f28847dceee86bd5cfffcd30d9cd6cc to your computer and use it in GitHub Desktop.
Rust HM x86 benchs [0]
➜ hashmap2 git:(layout_usize) ✗ cargo benchcmp hhkkvv_u64:: hhkkvv_usz:: x86.txt
name hhkkvv_u64:: ns/iter hhkkvv_usz:: ns/iter diff ns/iter diff %
grow_100_000 1,288,426 1,347,922 59,496 4.62%
grow_10_000 1,302,671 1,351,398 48,727 3.74%
grow_big_value_100_000 38,371,161 37,769,065 -602,096 -1.57%
grow_big_value_10_000 4,054,619 4,437,890 383,271 9.45%
grow_fnv_10_000 433,147 380,392 -52,755 -12.18%
insert_100 5,215 4,970 -245 -4.70%
insert_1000 48,039 44,946 -3,093 -6.44%
insert_100_000 6,843,047 7,122,700 279,653 4.09%
insert_10_000 532,906 530,855 -2,051 -0.38%
insert_1_000_000 124,166,274 124,684,470 518,196 0.42%
insert_int_bigvalue_10_000 1,440,912 1,390,695 -50,217 -3.49%
insert_str_10_000 626,603 595,789 -30,814 -4.92%
insert_string_10_000 1,370,791 1,371,131 340 0.02%
iter_keys_100_000 371,087 383,975 12,888 3.47%
iter_keys_1_000_000 8,448,411 8,579,116 130,705 1.55%
iter_keys_big_value_100_000 352,423 393,528 41,105 11.66%
iter_keys_big_value_1_000_000 8,386,089 8,615,999 229,910 2.74%
iter_values_100_000 392,468 545,712 153,244 39.05%
iter_values_1_000_000 8,797,970 11,673,560 2,875,590 32.68%
iterate_100_000 394,909 552,853 157,944 40.00%
iterate_1_000_000 8,778,111 11,821,943 3,043,832 34.68%
lookup_100_000 328,320 313,771 -14,549 -4.43%
lookup_100_000_bigvalue 319,496 316,429 -3,067 -0.96%
lookup_10_000 265,687 252,238 -13,449 -5.06%
lookup_10_000_bigvalue 281,491 261,869 -19,622 -6.97%
lookup_10_000_exist 257,790 246,435 -11,355 -4.40%
lookup_10_000_noexist 273,700 273,483 -217 -0.08%
lookup_1_000_000 257,266 251,604 -5,662 -2.20%
lookup_1_000_000_bigvalue 264,313 261,944 -2,369 -0.90%
lookup_1_000_000_bigvalue_unif 684,819 740,230 55,411 8.09%
lookup_1_000_000_unif 598,199 619,402 21,203 3.54%
merge_shuffle 1,604,293 1,636,942 32,649 2.04%
merge_simple 61,494,395 42,660,176 -18,834,219 -30.63%
new 9 9 0 0.00%
with_capacity_10e5 2,537 1,308 -1,229 -48.44%
➜ hashmap2 git:(layout_usize) ✗ cargo benchcmp hhkvkv_u64:: hhkvkv_usz:: x86.txt
name hhkvkv_u64:: ns/iter hhkvkv_usz:: ns/iter diff ns/iter diff %
grow_100_000 1,162,181 1,138,593 -23,588 -2.03%
grow_10_000 1,158,647 1,084,507 -74,140 -6.40%
grow_big_value_100_000 37,001,012 36,665,075 -335,937 -0.91%
grow_big_value_10_000 3,437,647 3,538,101 100,454 2.92%
grow_fnv_10_000 419,084 349,202 -69,882 -16.67%
insert_100 4,823 4,556 -267 -5.54%
insert_1000 46,000 45,223 -777 -1.69%
insert_100_000 6,664,378 6,213,870 -450,508 -6.76%
insert_10_000 534,694 510,209 -24,485 -4.58%
insert_1_000_000 123,740,627 107,358,807 -16,381,820 -13.24%
insert_int_bigvalue_10_000 1,651,770 1,539,210 -112,560 -6.81%
insert_str_10_000 599,655 580,417 -19,238 -3.21%
insert_string_10_000 1,382,560 1,363,848 -18,712 -1.35%
iter_keys_100_000 361,889 339,290 -22,599 -6.24%
iter_keys_1_000_000 8,312,419 8,026,248 -286,171 -3.44%
iter_keys_big_value_100_000 526,549 584,094 57,545 10.93%
iter_keys_big_value_1_000_000 9,904,451 9,810,863 -93,588 -0.94%
iter_values_100_000 366,842 338,926 -27,916 -7.61%
iter_values_1_000_000 8,532,860 8,143,969 -388,891 -4.56%
iterate_100_000 367,828 342,287 -25,541 -6.94%
iterate_1_000_000 8,542,904 8,187,025 -355,879 -4.17%
lookup_100_000 323,857 307,916 -15,941 -4.92%
lookup_100_000_bigvalue 342,299 323,328 -18,971 -5.54%
lookup_10_000 262,727 251,569 -11,158 -4.25%
lookup_10_000_bigvalue 282,536 264,107 -18,429 -6.52%
lookup_10_000_exist 252,367 244,794 -7,573 -3.00%
lookup_10_000_noexist 273,349 273,088 -261 -0.10%
lookup_1_000_000 284,377 248,260 -36,117 -12.70%
lookup_1_000_000_bigvalue 268,109 262,584 -5,525 -2.06%
lookup_1_000_000_bigvalue_unif 660,544 687,425 26,881 4.07%
lookup_1_000_000_unif 517,636 535,840 18,204 3.52%
merge_shuffle 1,488,137 1,400,964 -87,173 -5.86%
merge_simple 38,786,908 31,456,907 -7,330,001 -18.90%
new 9 9 0 0.00%
with_capacity_10e5 2,500 1,350 -1,150 -46.00%
➜ hashmap2 git:(layout_usize) ✗ cargo benchcmp hhkkvv_usz:: hhkvkv_usz:: x86.txt
name hhkkvv_usz:: ns/iter hhkvkv_usz:: ns/iter diff ns/iter diff %
grow_100_000 1,347,922 1,138,593 -209,329 -15.53%
grow_10_000 1,351,398 1,084,507 -266,891 -19.75%
grow_big_value_100_000 37,769,065 36,665,075 -1,103,990 -2.92%
grow_big_value_10_000 4,437,890 3,538,101 -899,789 -20.28%
grow_fnv_10_000 380,392 349,202 -31,190 -8.20%
insert_100 4,970 4,556 -414 -8.33%
insert_1000 44,946 45,223 277 0.62%
insert_100_000 7,122,700 6,213,870 -908,830 -12.76%
insert_10_000 530,855 510,209 -20,646 -3.89%
insert_1_000_000 124,684,470 107,358,807 -17,325,663 -13.90%
insert_int_bigvalue_10_000 1,390,695 1,539,210 148,515 10.68%
insert_str_10_000 595,789 580,417 -15,372 -2.58%
insert_string_10_000 1,371,131 1,363,848 -7,283 -0.53%
iter_keys_100_000 383,975 339,290 -44,685 -11.64%
iter_keys_1_000_000 8,579,116 8,026,248 -552,868 -6.44%
iter_keys_big_value_100_000 393,528 584,094 190,566 48.43%
iter_keys_big_value_1_000_000 8,615,999 9,810,863 1,194,864 13.87%
iter_values_100_000 545,712 338,926 -206,786 -37.89%
iter_values_1_000_000 11,673,560 8,143,969 -3,529,591 -30.24%
iterate_100_000 552,853 342,287 -210,566 -38.09%
iterate_1_000_000 11,821,943 8,187,025 -3,634,918 -30.75%
lookup_100_000 313,771 307,916 -5,855 -1.87%
lookup_100_000_bigvalue 316,429 323,328 6,899 2.18%
lookup_10_000 252,238 251,569 -669 -0.27%
lookup_10_000_bigvalue 261,869 264,107 2,238 0.85%
lookup_10_000_exist 246,435 244,794 -1,641 -0.67%
lookup_10_000_noexist 273,483 273,088 -395 -0.14%
lookup_1_000_000 251,604 248,260 -3,344 -1.33%
lookup_1_000_000_bigvalue 261,944 262,584 640 0.24%
lookup_1_000_000_bigvalue_unif 740,230 687,425 -52,805 -7.13%
lookup_1_000_000_unif 619,402 535,840 -83,562 -13.49%
merge_shuffle 1,636,942 1,400,964 -235,978 -14.42%
merge_simple 42,660,176 31,456,907 -11,203,269 -26.26%
new 9 9 0 0.00%
with_capacity_10e5 1,308 1,350 42 3.21%
➜ hashmap2 git:(layout_usize) ✗ cargo benchcmp hhkkvv_u64:: hhkvkv_u64:: x86.txt
name hhkkvv_u64:: ns/iter hhkvkv_u64:: ns/iter diff ns/iter diff %
grow_100_000 1,288,426 1,162,181 -126,245 -9.80%
grow_10_000 1,302,671 1,158,647 -144,024 -11.06%
grow_big_value_100_000 38,371,161 37,001,012 -1,370,149 -3.57%
grow_big_value_10_000 4,054,619 3,437,647 -616,972 -15.22%
grow_fnv_10_000 433,147 419,084 -14,063 -3.25%
insert_100 5,215 4,823 -392 -7.52%
insert_1000 48,039 46,000 -2,039 -4.24%
insert_100_000 6,843,047 6,664,378 -178,669 -2.61%
insert_10_000 532,906 534,694 1,788 0.34%
insert_1_000_000 124,166,274 123,740,627 -425,647 -0.34%
insert_int_bigvalue_10_000 1,440,912 1,651,770 210,858 14.63%
insert_str_10_000 626,603 599,655 -26,948 -4.30%
insert_string_10_000 1,370,791 1,382,560 11,769 0.86%
iter_keys_100_000 371,087 361,889 -9,198 -2.48%
iter_keys_1_000_000 8,448,411 8,312,419 -135,992 -1.61%
iter_keys_big_value_100_000 352,423 526,549 174,126 49.41%
iter_keys_big_value_1_000_000 8,386,089 9,904,451 1,518,362 18.11%
iter_values_100_000 392,468 366,842 -25,626 -6.53%
iter_values_1_000_000 8,797,970 8,532,860 -265,110 -3.01%
iterate_100_000 394,909 367,828 -27,081 -6.86%
iterate_1_000_000 8,778,111 8,542,904 -235,207 -2.68%
lookup_100_000 328,320 323,857 -4,463 -1.36%
lookup_100_000_bigvalue 319,496 342,299 22,803 7.14%
lookup_10_000 265,687 262,727 -2,960 -1.11%
lookup_10_000_bigvalue 281,491 282,536 1,045 0.37%
lookup_10_000_exist 257,790 252,367 -5,423 -2.10%
lookup_10_000_noexist 273,700 273,349 -351 -0.13%
lookup_1_000_000 257,266 284,377 27,111 10.54%
lookup_1_000_000_bigvalue 264,313 268,109 3,796 1.44%
lookup_1_000_000_bigvalue_unif 684,819 660,544 -24,275 -3.54%
lookup_1_000_000_unif 598,199 517,636 -80,563 -13.47%
merge_shuffle 1,604,293 1,488,137 -116,156 -7.24%
merge_simple 61,494,395 38,786,908 -22,707,487 -36.93%
new 9 9 0 0.00%
with_capacity_10e5 2,537 2,500 -37 -1.46%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment