Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-96176

Avoid unnecessary string copies in NumberParser for double parsing

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • SP Prioritized List

      Previously seen in SERVER-78480, we have observed this in profiling JParse(json.cpp). Parsing doubles copies the entire string which can be arbitrarily long. Given that we already have a StringData in parseNumberFromStringHelper<double>(), we can use C++ istringstream double parsing routine in place of strtod().

            Assignee:
            Unassigned Unassigned
            Reporter:
            jess.balint@mongodb.com Jess Balint
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: