File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
sandbox/PerfBenchmarkDotNet Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1- // Copyright (c) All contributors. All rights reserved.
1+ // Copyright (c) All contributors. All rights reserved.
22// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33
44extern alias newmsgpack ;
@@ -60,6 +60,12 @@ public IntKeySerializerTarget IntKey()
6060 return newmsgpack . MessagePack . MessagePackSerializer . Deserialize < IntKeySerializerTarget > ( intObj ) ;
6161 }
6262
63+ [ Benchmark ]
64+ public IntKeySerializerTarget IntKey_NonGeneric ( )
65+ {
66+ return ( IntKeySerializerTarget ) newmsgpack . MessagePack . MessagePackSerializer . Deserialize ( typeof ( IntKeySerializerTarget ) , intObj ) ;
67+ }
68+
6369 [ Benchmark ]
6470 public StringKeySerializerTarget StringKey ( )
6571 {
Original file line number Diff line number Diff line change 1- // Copyright (c) All contributors. All rights reserved.
1+ // Copyright (c) All contributors. All rights reserved.
22// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33
44extern alias newmsgpack ;
@@ -35,6 +35,12 @@ public byte[] IntKey()
3535 return newmsgpack . MessagePack . MessagePackSerializer . Serialize < IntKeySerializerTarget > ( intData ) ;
3636 }
3737
38+ [ Benchmark ]
39+ public byte [ ] IntKey_NonGeneric ( )
40+ {
41+ return newmsgpack . MessagePack . MessagePackSerializer . Serialize ( typeof ( IntKeySerializerTarget ) , intData ) ;
42+ }
43+
3844 [ Benchmark ]
3945 public byte [ ] StringKey ( )
4046 {
You can’t perform that action at this time.
0 commit comments