Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-1062

More efficiently serialize array indexes in raw serializer

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • bson-2.5.0
    • Affects Version/s: None
    • Component/s: BSON
    • Labels:

      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

            Assignee:
            patrick.freed@mongodb.com Patrick Freed
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: