Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-12699

.NET: Remove TypeCaster

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: platforms
    • Labels:

      Description

      TypeCaster class is used in Ignite.NET for non-boxing, faster casts.
      Benchmarks on .NET 4.0 displayed clear advantage of this solution.

      However, this is no longer true on .NET Core due to improvements in the framework:

      |     Method |       Runtime |      Mean |     Error |    StdDev |
      |----------- |-------------- |----------:|----------:|----------:|
      | TypeCaster | .NET Core 2.2 | 3.4615 ns | 0.0325 ns | 0.0304 ns |
      | ObjectCast | .NET Core 2.2 | 1.0936 ns | 0.0040 ns | 0.0036 ns |
      | UnsafeCast | .NET Core 2.2 | 4.1921 ns | 0.0125 ns | 0.0111 ns |
      | TypeCaster | .NET Core 3.1 | 1.5306 ns | 0.0042 ns | 0.0037 ns |
      | ObjectCast | .NET Core 3.1 | 0.0229 ns | 0.0029 ns | 0.0024 ns |
      | UnsafeCast | .NET Core 3.1 | 2.1868 ns | 0.0052 ns | 0.0043 ns |
      

      (See benchmark code in https://github.com/ptupitsyn/IgniteNetBenchmarks)

      Remove TypeCaster class and use regular cast instead.
      Run Ignite deserialization benchmarks to confirm the effect.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ptupitsyn Pavel Tupitsyn
                Reporter:
                ptupitsyn Pavel Tupitsyn
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: