@cancel
Dumb fishes that can't climb trees…
The example is just a few float multiplications, so yes, going over the top to create classes and introduce gratuitous complexity is just wasted performance.
I love how «adding a concern» is just adding another float computation…
I would enjoy watching the “array version” with other type of shapes (say random quadrilateral).
In my experience, “performance” first → terser code → errors/bugs.
A wrong but fast answer is a worse waste of resources.