RecordId relops should take arguments by const reference

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Dev Platform 2021-09-20
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When RecordId was a trivial wrapper around an int64_t, it made some sense for the free-function relops to be written as taking RecordId by value, but subsequent evolution of RecordId has invalidated that assumption. Notably, the addition of a fixed char array and later a ConstSharedBuffer means that a real copy constructor is getting synthesized and invoked for both arguments to the relops. This is potentially expensive if a RecordId is large and the ConstSharedBuffer is engaged, as it will jiggle the refcount atomic.

            Assignee:
            Andrew Morrow (Inactive)
            Reporter:
            Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: