Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Big performance difference between using class with static functions vs instantiated class?

I'm wondering if anyone has experience with if there is a big difference in performance in ActionScript 3 between keeping a class with only public static functions, and utilizing those functions often (as in a frame event at 30fps), and in turning the class into a "normal" class of which I instead make an instance and call the functions via the instance instead.

Hope I'm explaining myself fairly okay here...

cheers

like image 902
Poppe76 Avatar asked Apr 27 '26 11:04

Poppe76


1 Answers

According uber AS3 optimiser Jackson Dunstan there is a significant difference, with static methods being about 3 to 4 times slower than non-static methods.

  • Static vs. non-static
  • Why static is slow
like image 197
Luke Van In Avatar answered Apr 30 '26 03:04

Luke Van In



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!