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

Optimize ObjectID.Hex()

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Unknown Unknown
    • 1.11.0
    • None
    • None
    • None
    • Not Needed

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: