[
https://issues.apache.org/jira/browse/IGNITE-13883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17256100#comment-17256100
]
Pavel Tupitsyn edited comment on IGNITE-13883 at 12/29/20, 7:15 PM:
--------------------------------------------------------------------
Benchmark added: {{BinarySystemTypeReadBenchmark}}.
On Core i7-9700K, Ubuntu 20.04, .NET Core 3.1:
{code}
| | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 |
Allocated |
|-------
|---------:|----------:|----------:|-------:|------:|------:|----------:|
| Before | 1.080 us | 0.0030 us | 0.0025 us | 0.0725 | - | - | 456
B |
| After | 849.4 ns | 4.44 ns | 4.16 ns | 0.0725 | - | - | 456
B |
{code}
(~20% improvement)
was (Author: ptupitsyn):
Benchmark added: {{BinarySystemTypeReadBenchmark}}.
On Core i7-9700K, Ubuntu 20.04, .NET Core 3.1:
*BEFORE*
{code}
| Method | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 |
Allocated |
|-------
|---------:|----------:|----------:|-------:|------:|------:|----------:|
| Read | 1.080 us | 0.0030 us | 0.0025 us | 0.0725 | - | - | 456
B |
{code}
*AFTER*
{code}
| Method | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------- |---------:|--------:|--------:|-------:|------:|------:|----------:|
| Read | 849.4 ns | 4.44 ns | 4.16 ns | 0.0725 | - | - | 456 B |
{code}
(~20% improvement)
> .NET: Performance: Refactor BinarySystemHandlers.TryReadSystemType to
> switch-case
> ---------------------------------------------------------------------------------
>
> Key: IGNITE-13883
> URL: https://issues.apache.org/jira/browse/IGNITE-13883
> Project: Ignite
> Issue Type: Improvement
> Components: platforms
> Reporter: Pavel Tupitsyn
> Assignee: Pavel Tupitsyn
> Priority: Minor
> Labels: .NET
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {{BinarySystemHandlers.TryReadSystemType}} is too clever with interfaces and
> generics:
> * Hard to understand and maintain
> * Possibly causes overhead due to virtual method calls
> Refactor to switch-case and check if performance improves.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)