[SERVER-26751] $indexOfArray can optimize for constant array Created: 24/Oct/16 Updated: 08/May/18 Resolved: 26/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Charlie Swanson |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Participants: |
| Description |
|
When array passed to $indexOfArray is a constant array we can give O(1) lookup by using a hash table for the array. |
| Comments |
| Comment by Charlie Swanson [ 26/Apr/18 ] |
|
Author: {'email': 'KevinCybura@gmail.com', 'username': 'KevinCybura', 'name': 'KevinCybura'}Message: SERVER-25957 Optimize $indexOfArray when array argument is constant. Signed-off-by: Charlie Swanson <charlie.swanson@mongodb.com> Closes #1229 |