In my opinion it&#x27;s better to define criteria first and then evaluate possible solutions against them. 
What is more important for your code - to be fast, correct, easy to understand, fix or extend? How each possible solution scores on these scales?