Faster INT2STRING

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • 4.4
    • Affects Version/s: 4.4
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In _cbsonmodule.c, the INT2STRING macro is used during serialization. In my workload (heavily nested documents with large array fields), this macro becomes somewhat of a performance bottleneck. By swapping the macro for a more purpose-built function like this one by the MySQL team I was able to significantly improve performance. After applying the optimization mentioned in PYTHON-3717), this tweak netted me an additional 2x speed-up on my `insert_one` calls.

              Assignee:
              Steve Silvester
              Reporter:
              thalassemia N/A
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: