File tree 2 files changed +14
-2
lines changed
sandbox/PerfBenchmarkDotNet
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.
2
2
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
4
4
extern alias newmsgpack ;
@@ -60,6 +60,12 @@ public IntKeySerializerTarget IntKey()
60
60
return newmsgpack . MessagePack . MessagePackSerializer . Deserialize < IntKeySerializerTarget > ( intObj ) ;
61
61
}
62
62
63
+ [ Benchmark ]
64
+ public IntKeySerializerTarget IntKey_NonGeneric ( )
65
+ {
66
+ return ( IntKeySerializerTarget ) newmsgpack . MessagePack . MessagePackSerializer . Deserialize ( typeof ( IntKeySerializerTarget ) , intObj ) ;
67
+ }
68
+
63
69
[ Benchmark ]
64
70
public StringKeySerializerTarget StringKey ( )
65
71
{
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.
2
2
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
4
4
extern alias newmsgpack ;
@@ -35,6 +35,12 @@ public byte[] IntKey()
35
35
return newmsgpack . MessagePack . MessagePackSerializer . Serialize < IntKeySerializerTarget > ( intData ) ;
36
36
}
37
37
38
+ [ Benchmark ]
39
+ public byte [ ] IntKey_NonGeneric ( )
40
+ {
41
+ return newmsgpack . MessagePack . MessagePackSerializer . Serialize ( typeof ( IntKeySerializerTarget ) , intData ) ;
42
+ }
43
+
38
44
[ Benchmark ]
39
45
public byte [ ] StringKey ( )
40
46
{
You can’t perform that action at this time.
0 commit comments