Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2542

Optimize ObjectID.Hex()

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.11.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed

      EncodeToString internally creates a slice not an array and thus makes unnecessary allocation. Since we know exactly the size of the resulting hex, we can optimize the function by using an array.

            Assignee:
            qingyang.hu@mongodb.com Qingyang Hu
            Reporter:
            qingyang.hu@mongodb.com Qingyang Hu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: