NumberParser is used in BSONElement, the SBE VM, and many _gen files. This class uses a helper function parseNumberFromStringHelper, where I see two unnecessary string copies: #1 and #2.
In an extreme case I came up with, parsing one million numbers from {$match: {a: 1, b: 1, c: 1, ...}} originally took 4 seconds, and with a few lines change to avoid a copy it took 2 seconds instead, and the patch was green.
We should also look at the Decimal128 constructors, they appear to make unnecessary copies as well.
- is related to
-
SERVER-96176 Avoid unnecessary string copies in NumberParser for double parsing
- Open
- related to
-
SERVER-62509 Write tests to stress ABT and Bonsai
- Closed