Reduce memory traffic associated with Hasher.cs

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Follow up for https://jira.mongodb.org/browse/CSHARP-4292

      • Make Hasher a struct, to reduce memory traffic in associated GetHashCode.
      • Add public 
        Hasher Hash<T>(T obj) where T : struct

         to eliminate boxing for value types (BsonArray.GetHashCode, Hasher.Hash(BsonType))

              Assignee:
              Unassigned
              Reporter:
              Boris Dogadov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: