Skip to content

IsDefinedEx benchmarks

Michael Lidgren edited this page Jan 27, 2021 · 2 revisions

See enums used here. Code to produce this benchmark is here.

Method Mean Error StdDev Median Ratio Gen 0 Allocated
Core_SimpleEnum 33.8439 ns 0.1513 ns 0.1415 ns 33.8546 ns 1.00 0.0057 24 B
EnumsNET_SimpleEnum 0.7856 ns 0.0366 ns 0.0325 ns 0.7780 ns 0.02 - -
FastEnum_SimpleEnum 0.8469 ns 0.0470 ns 0.1001 ns 0.7938 ns 0.03 - -
Lidgren_SimpleEnum 0.5027 ns 0.0082 ns 0.0077 ns 0.5011 ns 0.01 - -
Core_OffsetDiscontinuousEnum 33.8579 ns 0.2900 ns 0.2712 ns 33.9030 ns 1.00 0.0057 24 B
EnumsNET_OffsetDiscontinuousEnum 1.1145 ns 0.0089 ns 0.0079 ns 1.1134 ns 0.03 - -
FastEnum_OffsetDiscontinuousEnum 1.3649 ns 0.0195 ns 0.0173 ns 1.3603 ns 0.04 - -
Lidgren_OffsetDiscontinuousEnum 1.8954 ns 0.0056 ns 0.0044 ns 1.8965 ns 0.06 - -
Core_FlagsEnum_Single 33.6734 ns 0.1779 ns 0.1664 ns 33.6333 ns 1.00 0.0057 24 B
EnumsNET_FlagsEnum_Single 1.4117 ns 0.0477 ns 0.0399 ns 1.3914 ns 0.04 - -
FastEnum_FlagsEnum_Single 1.3415 ns 0.0146 ns 0.0136 ns 1.3406 ns 0.04 - -
Lidgren_FlagsEnum_Single 1.7525 ns 0.0267 ns 0.0223 ns 1.7530 ns 0.05 - -
Clone this wiki locally