Reputation: 8655
I'm about to refactor a long algorithm so it can be adapted to any property instead of a fixed one.
So, instead of having var.x I would have var[property], where property can be x, y, alpha, etc.
But, a question appeared, performance wise, does it present an impact?.
Thanks!
Upvotes: 0
Views: 31
Reputation: 140230
In relative terms yes it's slower, whether that matters depends on deep specifics of your application and its usage patterns.
Upvotes: 1