3 ms·
You only have to do that in hot loops (in most problems), that you can easily profile with the very good observability tools that java provides. The rest can be
by kaba0 5y ago
You only have to do that in hot loops (in most problems), that you can easily profile with the very good observability tools that java provides. The rest can be maintainable, good quality OOP code.
I would even go as far and say that OOP’s encapsulation pretty much exists just for this: the “ugly” implementation can reside inside a class and you only have to care about its public API from the outside.