This project has moved. For the latest updates, please go here.

Benchmark Result under .NET 3.5

Benchmark for Object Construction

Initialization
Init info: 1 ms
Init ctorInvoker: 40 ms


Executing for 20000 iterations
Direct ctor: 0 ms
Reflection ctor: 75 ms
Fasterflect ctor: 9 ms
Fasterflect cached ctor: 0 ms


Executing for 2000000 iterations
Direct ctor: 27 ms
Reflection ctor: 8005 ms
Fasterflect ctor: 598 ms
Fasterflect cached ctor: 34 ms


Benchmark for Field Access

Initialization
Init info: 0 ms
Init setter: 13 ms
Init getter: 6 ms


Executing for 20000 iterations
Direct set: 0 ms
Direct get: 0 ms
Reflection set: 52 ms
Reflection get: 47 ms
Fasterflect set: 6 ms
Fasterflect get: 5 ms
Fasterflect cached set: 0 ms
Fasterflect cached get: 0 ms


Executing for 2000000 iterations
Direct set: 15 ms
Direct get: 12 ms
Reflection set: 5160 ms
Reflection get: 5067 ms
Fasterflect set: 578 ms
Fasterflect get: 521 ms
Fasterflect cached set: 27 ms
Fasterflect cached get: 19 ms


Benchmark for Static Field Access

Initialization
Init info: 0 ms
Init setter: 0 ms
Init getter: 0 ms


Executing for 20000 iterations
Direct set: 0 ms
Direct get: 0 ms
Reflection set: 63 ms
Reflection get: 53 ms
Fasterflect set: 6 ms
Fasterflect get: 6 ms
Fasterflect cached set: 0 ms
Fasterflect cached get: 0 ms


Executing for 2000000 iterations
Direct set: 13 ms
Direct get: 11 ms
Reflection set: 5164 ms
Reflection get: 4788 ms
Fasterflect set: 480 ms
Fasterflect get: 482 ms
Fasterflect cached set: 34 ms
Fasterflect cached get: 29 ms


Benchmark for Property Access

Initialization
Init info: 0 ms
Init setter: 7 ms
Init getter: 1 ms


Executing for 20000 iterations
Direct set: 0 ms
Direct get: 0 ms
Reflection set: 107 ms
Reflection get: 97 ms
Fasterflect set: 6 ms
Fasterflect get: 8 ms
Fasterflect cached set: 0 ms
Fasterflect cached get: 0 ms


Executing for 2000000 iterations
Direct set: 11 ms
Direct get: 12 ms
Reflection set: 10866 ms
Reflection get: 9593 ms
Fasterflect set: 493 ms
Fasterflect get: 528 ms
Fasterflect cached set: 41 ms
Fasterflect cached get: 31 ms


Benchmark for Static Property Access

Initialization
Init info: 0 ms
Init setter: 0 ms
Init getter: 0 ms


Executing for 20000 iterations
Direct set: 0 ms
Direct get: 0 ms
Reflection set: 104 ms
Reflection get: 90 ms
Fasterflect set: 6 ms
Fasterflect get: 6 ms
Fasterflect cached set: 1 ms
Fasterflect cached get: 0 ms


Executing for 2000000 iterations
Direct set: 12 ms
Direct get: 11 ms
Reflection set: 11504 ms
Reflection get: 9726 ms
Fasterflect set: 529 ms
Fasterflect get: 445 ms
Fasterflect cached set: 34 ms
Fasterflect cached get: 31 ms


Benchmark for Method Invocation

Initialization
Init no-arg info: 0 ms
Init arg info: 0 ms
Init no-arg invoker: 8 ms
Init arg invoker: 2 ms


Executing for 20000 iterations
Direct invoke: 0 ms
Direct invoke (arg): 0 ms
Reflection invoke: 91 ms
Reflection invoke (arg): 113 ms
Fasterflect invoke: 7 ms
Fasterflect invoke (arg): 8 ms
Fasterflect cached invoke: 0 ms
Fasterflect cached invoke (arg): 0 ms


Executing for 2000000 iterations
Direct invoke: 12 ms
Direct invoke (arg): 12 ms
Reflection invoke: 8812 ms
Reflection invoke (arg): 9491 ms
Fasterflect invoke: 511 ms
Fasterflect invoke (arg): 586 ms
Fasterflect cached invoke: 19 ms
Fasterflect cached invoke (arg): 24 ms


Benchmark for Static Method Invocation

Initialization
Init no-arg info: 0 ms
Init arg info: 0 ms
Init no-arg invoker: 0 ms
Init arg invoker: 0 ms


Executing for 20000 iterations
Direct invoke: 0 ms
Direct invoke (arg): 0 ms
Reflection invoke: 80 ms
Reflection invoke (arg): 92 ms
Fasterflect invoke: 5 ms
Fasterflect invoke (arg): 7 ms
Fasterflect cached invoke: 0 ms
Fasterflect cached invoke (arg): 0 ms


Executing for 2000000 iterations
Direct invoke: 14 ms
Direct invoke (arg): 11 ms
Reflection invoke: 8193 ms
Reflection invoke (arg): 9423 ms
Fasterflect invoke: 505 ms
Fasterflect invoke (arg): 561 ms
Fasterflect cached invoke: 16 ms
Fasterflect cached invoke (arg): 21 ms


Benchmark for Indexer Access

Initialization
Init setter info: 0 ms
Init getter info: 0 ms
Init setter: 1 ms
Init getter: 2 ms


Executing for 20000 iterations
Direct set: 0 ms
Direct get: 0 ms
Reflection set: 110 ms
Reflection get: 98 ms
Fasterflect set: 9 ms
Fasterflect get: 9 ms
Fasterflect cached set: 1 ms
Fasterflect cached get: 1 ms


Executing for 2000000 iterations
Direct set: 11 ms
Direct get: 10 ms
Reflection set: 10662 ms
Reflection get: 10133 ms
Fasterflect set: 789 ms
Fasterflect get: 730 ms
Fasterflect cached set: 108 ms
Fasterflect cached get: 97 ms


Benchmark for Array Element Access

Initialization
Init setter: 4 ms
Init getter: 2 ms


Executing for 20000 iterations
Direct set: 0 ms
Direct get: 0 ms
Reflection set: 0 ms
Reflection get: 0 ms
Fasterflect set: 1 ms
Fasterflect get: 1 ms
Fasterflect cached set: 0 ms
Fasterflect cached get: 0 ms


Executing for 2000000 iterations
Direct set: 17 ms
Direct get: 12 ms
Reflection set: 72 ms
Reflection get: 69 ms
Fasterflect set: 81 ms
Fasterflect get: 107 ms
Fasterflect cached set: 73 ms
Fasterflect cached get: 51 ms


Benchmark for Access Methods Enabled via .NET Reflection Metadata

Initialization
Init ctor info: 0 ms
Init property info: 0 ms
Init static property info: 0 ms
Init field info: 0 ms
Init static field info: 0 ms
Init no-arg info: 0 ms
Init arg info: 0 ms
Init static no-arg info: 0 ms
Init static arg info: 0 ms


Executing for 20000 iterations
--- Constructor: 0 ms
Direct ctor: 0 ms
Reflection ctor: 73 ms
Fasterflect ctor: 8 ms
--- Instance Field: 0 ms
Direct instance field set: 0 ms
Direct instance field get: 0 ms
Reflection instance field set: 47 ms
Reflection instance field get: 48 ms
Fasterflect instance field set: 9 ms
Fasterflect instance field get: 9 ms
--- Static Field: 0 ms
Direct static field set: 0 ms
Direct static field get: 0 ms
Reflection static field set: 50 ms
Reflection static field get: 46 ms
Fasterflect static field set: 8 ms
Fasterflect static field get: 7 ms
--- Instance Property: 0 ms
Direct instance property set: 0 ms
Direct instance property get: 0 ms
Reflection instance property set: 108 ms
Reflection instance property get: 96 ms
Fasterflect instance property set: 7 ms
Fasterflect instance property get: 7 ms
--- Static Property: 0 ms
Direct static property set: 0 ms
Direct static property get: 0 ms
Reflection static property set: 106 ms
Reflection static property get: 94 ms
Fasterflect static property set: 8 ms
Fasterflect static property get: 7 ms
--- Instance Method: 0 ms
Direct invoke: 0 ms
Direct invoke (arg): 0 ms
Reflection invoke: 83 ms
Reflection invoke (arg): 93 ms
Fasterflect invoke: 8 ms
Fasterflect invoke (arg): 13 ms
--- Static Method: 0 ms
Direct static invoke: 0 ms
Direct static invoke (arg): 0 ms
Reflection static invoke: 104 ms
Reflection static invoke (arg): 115 ms
Fasterflect static invoke: 7 ms
Fasterflect static invoke (arg): 11 ms


Executing for 2000000 iterations
--- Constructor: 12 ms
Direct ctor: 36 ms
Reflection ctor: 7658 ms
Fasterflect ctor: 836 ms
--- Instance Field: 11 ms
Direct instance field set: 16 ms
Direct instance field get: 11 ms
Reflection instance field set: 5141 ms
Reflection instance field get: 4784 ms
Fasterflect instance field set: 714 ms
Fasterflect instance field get: 699 ms
--- Static Field: 10 ms
Direct static field set: 12 ms
Direct static field get: 11 ms
Reflection static field set: 5226 ms
Reflection static field get: 4758 ms
Fasterflect static field set: 750 ms
Fasterflect static field get: 725 ms
--- Instance Property: 10 ms
Direct instance property set: 11 ms
Direct instance property get: 11 ms
Reflection instance property set: 11078 ms
Reflection instance property get: 9801 ms
Fasterflect instance property set: 692 ms
Fasterflect instance property get: 652 ms
--- Static Property: 11 ms
Direct static property set: 11 ms
Direct static property get: 10 ms
Reflection static property set: 11090 ms
Reflection static property get: 9157 ms
Fasterflect static property set: 661 ms
Fasterflect static property get: 686 ms
--- Instance Method: 11 ms
Direct invoke: 10 ms
Direct invoke (arg): 12 ms
Reflection invoke: 8443 ms
Reflection invoke (arg): 9420 ms
Fasterflect invoke: 729 ms
Fasterflect invoke (arg): 1135 ms
--- Static Method: 11 ms
Direct static invoke: 12 ms
Direct static invoke (arg): 11 ms
Reflection static invoke: 8050 ms
Reflection static invoke (arg): 9452 ms
Fasterflect static invoke: 691 ms
Fasterflect static invoke (arg): 1157 ms


Benchmark for Metadata Lookup

Initialization
Init Flags: 0 ms


Executing for 20000 iterations
--- Fields: 0 ms
Reflection GetField: 4 ms
Fasterflect Field: 5 ms
Reflection GetFields: 5 ms
Fasterflect Fields: 8 ms
Fasterflect Fields+1: 18 ms
Fasterflect Fields+5: 16 ms
--- Properties: 0 ms
Reflection GetProperty: 6 ms
Fasterflect Property: 8 ms
Reflection GetProperties: 5 ms
Fasterflect Properties: 8 ms
Fasterflect Properties+1: 16 ms
Fasterflect Properties+5: 18 ms
--- Members: 0 ms
Reflection GetMember: 51 ms
Fasterflect Member: 55 ms
Reflection GetMembers: 61 ms
Fasterflect Members: 44 ms
Fasterflect Members+1: 99 ms
Fasterflect Members+5: 102 ms
--- Methods: 0 ms
Reflection GetMethod: 12 ms
Fasterflect Method: 13 ms
Reflection GetMethods: 18 ms
Fasterflect Methods: 14 ms
Fasterflect Methods+1: 57 ms
Fasterflect Methods+2: 54 ms
Fasterflect Methods11: 48 ms
Fasterflect Members M: 17 ms
--- Constructors: 0 ms
Reflection GetConstructor: 6 ms
Fasterflect Constructor: 6 ms
Reflection GetConstructors: 5 ms
Fasterflect Constructors: 5 ms


Executing for 2000000 iterations
--- Fields: 11 ms
Reflection GetField: 381 ms
Fasterflect Field: 476 ms
Reflection GetFields: 541 ms
Fasterflect Fields: 708 ms
Fasterflect Fields+1: 1540 ms
Fasterflect Fields+5: 1705 ms
--- Properties: 11 ms
Reflection GetProperty: 683 ms
Fasterflect Property: 742 ms
Reflection GetProperties: 530 ms
Fasterflect Properties: 620 ms
Fasterflect Properties+1: 1421 ms
Fasterflect Properties+5: 1615 ms
--- Members: 12 ms
Reflection GetMember: 4854 ms
Fasterflect Member: 5525 ms
Reflection GetMembers: 5708 ms
Fasterflect Members: 4575 ms
Fasterflect Members+1: 9413 ms
Fasterflect Members+5: 10783 ms
--- Methods: 11 ms
Reflection GetMethod: 1093 ms
Fasterflect Method: 1142 ms
Reflection GetMethods: 2000 ms
Fasterflect Methods: 1388 ms
Fasterflect Methods+1: 5372 ms
Fasterflect Methods+2: 5148 ms
Fasterflect Methods11: 4574 ms
Fasterflect Members M: 1774 ms
--- Constructors: 11 ms
Reflection GetConstructor: 566 ms
Fasterflect Constructor: 543 ms
Reflection GetConstructors: 513 ms
Fasterflect Constructors: 529 ms

Last edited Mar 8, 2010 at 7:06 AM by buunguyen, version 2

Comments

No comments yet.