More efficiently serialize array indexes in raw serializer

XMLWordPrintableJSON

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

      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
              Reporter:
              Patrick Freed
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: