-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: BSON, Performance
Use Case
As a javascript engineer
I want to improve the performance of parsing <20 byte basic latin strings in BSON
So that BSON keys and short string values decode faster
User Impact
- Basic Latin strings should decode faster than before this change
Dependencies
- None
Unknowns
- None
Acceptance Criteria
Implementation Requirements
- Use String.fromCharCode if bytes are between [0, 127] and sequences are less than 20 bytes
- Refactor UTF8 validation to occur iff bytes exceed the above range
Testing Requirements
- Run benchmarks
- Ensure byte sequences that contain a byte greater than 127 still operate
Documentation Requirements
- None
Follow Up Requirements
- None