omniscient232
03-12-2009, 03:28 PM
Hello,
I wanted to show some benchmarks, because i don't understand why these are the results i get:
in class Ship:
public var wwidth:Number = width;
then:
doing all of these 10000 times, gives this:
craft.x; //11 ms
craft.width;//102 ms
craft.wwidth //1 ms
I cannot believe the amazing difference in performance of this.
And in terms of performance, this means that you can better use a var wwidth, like i did here, as long as your mc doesn't change inn size.
I wanted to show some benchmarks, because i don't understand why these are the results i get:
in class Ship:
public var wwidth:Number = width;
then:
doing all of these 10000 times, gives this:
craft.x; //11 ms
craft.width;//102 ms
craft.wwidth //1 ms
I cannot believe the amazing difference in performance of this.
And in terms of performance, this means that you can better use a var wwidth, like i did here, as long as your mc doesn't change inn size.