Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-6126

Improve performance of Long.fromBigInt

    • 2
    • 0
    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Use Case

      As a BSON user
      I want Long.fromBigInt to be performant
      So that I can efficiently translate to the Long type

      User Impact

      • Any user using Long.fromBigInt

      Dependencies

      • None

      Unknowns

      • Is there a performance difference between bigint literals and BigInt(number)

      Acceptance Criteria

      Implementation Requirements

      • Remove stringifying to translate BigInt to Long
      • Replace with bitwise operations that separate the high and low 32 bits and call the Long constructor.

      Testing Requirements

      • Existing tests
      • Manually check performance improvements

      Documentation Requirements

      • None

      Follow Up Requirements

      • None

            Assignee:
            aditi.khare@mongodb.com Aditi Khare
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: