• Type: Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible

      The constructor for ResourceId computes the hash of the entity each time. Here, we do this in the hot path over and over for the same Resource:
      https://github.com/10gen/mongo/blob/master/src/mongo/db/concurrency/lock_stats.h#L135

      This can be moved to a constant and save a lot of needless computation.

      xxhash might also speed up ResourceId, but it may not matter enough to bother with it.

            Assignee:
            colin.stolley@mongodb.com Colin Stolley
            Reporter:
            colin.stolley@mongodb.com Colin Stolley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: