From Pony documentation: Simplicity Simplicity can be sacrificed for performance. It is more important for the interface to be simple than the implementation. The faster the programmer can get stuff done, the better. It’s ok to make things a bit harder on the programmer to improve performance, but it’s more important to make things easier on the programmer than it is to make things easier on the language/runtime. Thi…
Simplicity should be sacrificed for performance. It doesn’t always have to be that way though. Several important classes of optimization lend themselves to simplifying code. For example, code that effectively makes the same decision three times is both slow and obscures the intent of the code. And there are ways to compartmentalize optimizations so that people working in the general vicinity don’t have to bother with…
The idea is if I have to choose between simplicity and performance, I shall choose performance.
Your example does not make sense because you are not choosing simplicity over performance because the code was already performing slow.
Compartmentalizing the code to hide the complexity behind a black box does not apply either because you are not making a complex code simpler, the one that has to maintain your black box is still exposed to the "clever" code.