[SERVER-20300] Make StringMap faster Created: 04/Sep/15 Updated: 07/Oct/15 Resolved: 25/Sep/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Performance |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.9 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | QuInt A (10/12/15) |
| Participants: |
| Description |
|
This is motivated primarily by performance gains to be had in query projection. |
| Comments |
| Comment by Githook User [ 25/Sep/15 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: Major changes:
|
| Comment by Mathias Stearn [ 08/Sep/15 ] |
|
The main thing is to get the % operator out of the lookup and insert codepath and instead use bit-masking on the hashes. That should improve all workloads regardless of size and lifetime. At the very least the query projection implementation is very sensitive to StringMap performance. Some exploratory benchmarks charlie.swanson performed showed ~50% more ops/sec by replacing StringMap with Document. |
| Comment by Andy Schwerin [ 05/Sep/15 ] |
|
Describe the usage pattern you want to accelerate? How many map entries? How frequently built/destroyed? How many accesses per instance? Is there a microenchmark that we could optimize for? If it were infinitely fast, how much would it prove what workloads? |