Compare implementations of a method in Java

This post is history. Read the latest version.

 

Often at work, I look at the code from the legacy of my project and wonder: was this coded this way for a purpose? Is it optimization? And doubt is upon me. My way seems better, but what if it is not? Well, let us just have a quick comparison!

In this article, I will give you the comparison class I created for myself. Quite simple, focused on time (not the best indicator, maybe, but a clue nonetheless). You just have to supply two methods, configure how you want to run it, and run it. Interested?
Continue reading Compare implementations of a method in Java