can you believe that more code gives ability to add much more faster?

In last blog click we have the chance to refactor a logic expression to be more developer friendly, but it was generating more IL code lines. I was wondering if that will have an impact on the performance (u know when u use a language that is focused on extending your product not on high performance - then this is a bit of over engineering case 💩💩💩).

So yes, I made a benchmark in LinqPad making my friend Selciuk unhappy a bit, but the results are very interesting.


In 2 form 5 test cases, refactored code was performing a bit better, but I am more happy that in the other three cases it was not terribly slow, with a maximum of 4% slower.


So having those results, let's say that it is more important to write code that is easier to extend! 
If you willing to write a high performance stuff - then you need to be ready to decipher every line, every time when you read it :D.



Comments

Popular posts from this blog

when a new guy joins a team...

FizzBuzz - my first interview task on whiteboard

are YOU a garbage collector?