Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2284

Convert IByteConverter from an interface to static implementation

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Critical
    • 3.0.0-beta.4
    • None
    • None
    • None
    • 1

    Description

      IByteConverter doesn't really represent methods that will ever have varied implementations. The way you read an integer in big-endian by order from an array of bytes is always the same.

      As such, we can gain performance improvements by using static methods rather than an interface to access the implementation. This is a big advantage given how frequently these methods are used.

      1. This will allow the JIT compiler to inline the methods where reasonable
      2. When they aren't inlined, it will above virtual method table lookups to execute the call
      3. It won't be necessary to pass references to IByteConverter around between classes/methods

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            btburnett3 Brant Burnett
            btburnett3 Brant Burnett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty