Math.Max/Min vs inline comparisons
Math.Max/Min vs inline comparisons This test stemmed from my having to write a lot of code, and look at a lot of code, that was doing comparisons between 2-3 numbers…
Developing is like telling jokes: if you have to explain it, it's not as good as it could be.
Math.Max/Min vs inline comparisons This test stemmed from my having to write a lot of code, and look at a lot of code, that was doing comparisons between 2-3 numbers…
Division Vs Multiplication Equivalent It’s a common belief in the world of programming that division is slower than multiplication. Not in order of magnitudes, but relatively. Granted, it depends on…
Does caching calculated loop indexes make a difference? Recently I was reviewing code to a real time financial application. Within a major for-loop construct, I came across the following subset…
Does Parameter Order Make A Difference? I remember reading once that frequently accessed method variables placed first within a method’s signature are accessed faster as they are allocated for available…
Greater Than vs Less Than vs Equals in C# As a programmer, have you ever had a situation where there’s a variable that could be 1 of 2 or maybe…
Length Vs Count Vs Initialized Variable in C# This test originated from having to loop over millions of records in an array in an application that requires everything be as…
C# Using Ints Vs Stringified-Ints This article details the benchmarks and performance showdown in C# using Ints Vs Stringified-Ints. Often enough C# programmers will find themselves using numbers in their…
C# ConvertTo Vs Parse This article details the benchmark and performance showdown: C# ConvertTo vs Parse methods. In any programming language, data type conversions are inevitably going to happen. C#…
C#: Dictionary Vs ConcurrentDictionary In this article we are going to benchmark a C# Dictionary Vs ConcurrentDictionary while adding/updating key-value pairs. This test came about while I was upgrading multiple…
C# TryParse Vs Try Catch This article details the C# benchmark showdown between TryParse Vs Try Catch performance. C# programmers are undoubtedly familiar with the multiple ways data can be…