C# – SomeEnum.ToString measured to be 400x slower

added by Paul Wheeler
10/1/2014 8:35:47 PM

4 Kicks, 207 Views

Every LOB application within .NET seems to consist of two things: 100000000000000000 if( x != null) { ... } and 32456783 SomeEnum.ToString()executions. Lets leave the if-case and instead focus on the 400x slower SomeEnum.ToString(). Yes. You read “400x slower”, but slower than what? And does it matter?