02/20/2022
At a recent event I have challenged a design and implementation from performance point of view. My concern was using the C# decimal
type over double
when there was no need for it from number- precision, calculation, or representation side. I was curious if the developers have made their "due diligence" and compared the performance impact of choosing one type over another.
To summarize the answer to my questions in short, no measurements were made by the developers. However, to address my curiosity, I was told that the operation in question "only takes a few seconds" and it was also demonstrated by clicking a button that triggers the operation and a few seconds later the results were displayed. All good, business stakeholders were happy, and the event continued. It was not a forum to get into a deeper discussion about this answer. I have seen similar responses in the past, but unfortunately, I cannot think of a single aspect of the response that would be answering the question.
First, a single click and a demonstration of the operation is not a performance measurement. No numbers were involved, no resource utilization was measured, no throughput and latency has been calculated. Moreover, you cannot even reason about these numbers from a single request. Second, the business has not set any performance goals. Third, the demonstration happened on a test environment with minimal test data and a single user putting load on the system. Finally, I asked for a performance comparison between two implementations, but the answer and the demonstration did not touch this aspect.
Because I do not have the environment and the code to run and measure such operation, I will have to rely on generic reasoning and assumptions to explain why I was eager to see such performance comparison.
Find out more