performance - Is doing this: var[property] more resource intensive than var.property? -


i'm refactor long algorithm can adapted property instead of fixed one.

so, instead of having var.x have var[property], property can x, y, alpha, etc.

but, question appeared, performance wise, present impact?.

thanks!

in relative terms yes it's slower, whether matters depends on deep specifics of application , usage patterns.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -