-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+25% throughput with segmented arrays (#188)
* +25% throughput with segmented arrays For every updated actor in the network body, there are two hash functions run. One to lookup the actor id to grab their object id, and another to look up that object id's attributes. Even with the fastest hash function (FNV), this is still slow when executed a 100k times in a replay. The solution is to transition the hashmap to a segmented array where small indices (which are the vast majority of them) are looked up directly in a sparse array with a static size. Indices that fall outside the array are still stored in a hashmap. Benchmarks showed a +25% throughput improvement, which imo is kinda incredible that such performance improvement are still on the table. * ... * update perf numbers * Update error model
- Loading branch information
1 parent
0803cfd
commit 4b29649
Showing
5 changed files
with
289 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.