efficient/libcuckoo — pull request #3 by awreece (2013-06-26 17:37:04+00:00)
Title: don't false share thread args in multithread test

Difference in performance.

Before:
~~~
% ./test_cuckoo_mt
initializing hash table
[libcuckoo:cuckoohash.c:580] total number of items 0
[libcuckoo:cuckoohash.c:581] total size 1073741824 Bytes, or 1024.00 MB
[libcuckoo:cuckoohash.c:582] load factor 0.0000
[tput in MOPS] reader0 1.74 writer0 3.19
[tput in MOPS] reader0 4.19 writer0 2.88
[tput in MOPS] reader0 4.15 writer0 2.85
[tput in MOPS] reader0 4.17 writer0 2.86
[tput in MOPS] reader0 4.12 writer0 2.82
[tput in MOPS] reader0 4.06 writer0 2.76
[tput in MOPS] reader0 4.21 writer0 2.81
[tput in MOPS] reader0 4.23 writer0 2.82
[tput in MOPS] reader0 4.27 writer0 2.86
[tput in MOPS] reader0 4.14 writer0 2.75
[tput in MOPS] reader0 2.05 writer0 1.37
[reader0] 41360042 lookups, 0 failures
[writer0] 30000000 inserts, 0 failures
[PASSED]
~~~

After;
~~~
% ./test_cuckoo_mt
initializing hash table
[libcuckoo:cuckoohash.c:580] total number of items 0
[libcuckoo:cuckoohash.c:581] total size 1073741824 Bytes, or 1024.00 MB
[libcuckoo:cuckoohash.c:582] load factor 0.0000
[tput in MOPS] reader0 1.91 writer0 3.32
[tput in MOPS] reader0 4.67 writer0 3.24
[tput in MOPS] reader0 4.61 writer0 3.11
[tput in MOPS] reader0 4.48 writer0 3.07
[tput in MOPS] reader0 4.33 writer0 2.99
[tput in MOPS] reader0 4.48 writer0 3.11
[tput in MOPS] reader0 4.36 writer0 2.99
[tput in MOPS] reader0 4.55 writer0 3.10
[tput in MOPS] reader0 4.65 writer0 3.18
[tput in MOPS] reader0 2.75 writer0 1.88
[reader0] 40814208 lookups, 0 failures
[writer0] 30000000 inserts, 0 failures
[PASSED]
~~~