commit | 25f7bbcf28f5c83b11149989b3552d87c1f3c5e9 | [log] [tgz] |
---|---|---|
author | Dave Watson <davejwatson@fb.com> | Mon Oct 31 16:23:33 2016 -0700 |
committer | Jason Evans <jasone@canonware.com> | Wed Nov 02 20:30:53 2016 -0700 |
tree | aa27872a941e3e5d47a6da51d59da53fe018afe5 | |
parent | 712fde79fda767ce1eec7cf1c967feeae90b0c21 [diff] |
Fix long spinning in rtree_node_init rtree_node_init spinlocks the node, allocates, and then sets the node. This is under heavy contention at the top of the tree if many threads start to allocate at the same time. Instead, take a per-rtree sleeping mutex to reduce spinning. Tested both pthreads and osx OSSpinLock, and both reduce spinning adequately Previous benchmark time: ./ttest1 500 100 ~15s New benchmark time: ./ttest1 500 100 .57s