Search code examples
flashactionscript-3inline

get / set functions and inlining


My question is pretty simple:
Q: Do get and set functions have an increased chance of being inlined compared to standard functions?

If so, is there anything that prevents me from using them for something other than their intended use? (Other than my code becoming less readable.)


Solution

  • To my knowledge, Flash very rarely inlines anything. I am almost positive it doesn't even happen for getters and setters as you can still acccess them by reflection (which shouldn't be possible for inlined definitions). I would certainly not use them in the effort to improve performance. If you really really want those gains, use Haxe instead as you can do true inline function definitions with the Flash runtime with it. Hope this helps!