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

More efficiently serialize array indexes in raw serializer

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Unknown
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: BSON
    • Labels:

      Description

      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

        Attachments

          Activity

            People

            Assignee:
            karmen.liang Karmen Liang
            Reporter:
            patrick.freed Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: