-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: BSON
The raw serializer currently relies on u64's Display implementation for serializing keys. This requires a heap allocation and can thus be pretty slow. If we update this to just push the necessary bytes to the document being built instead, we could see significant performance increases.
For context, see this thread: https://users.rust-lang.org/t/blog-post-making-slow-rust-code-fast/66074