flash on 2015-11-11
♥0 |
Line 26 |
Modified 2015-11-11 22:59:47 |
MIT License
archived:2017-03-20 05:34:16
ActionScript3 source code
/**
* Copyright DaniilTutubalin ( http://wonderfl.net/user/DaniilTutubalin )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/cz0N
*/
package {
import flash.text.TextField;
import flash.display.Sprite;
import flash.text.TextField;
import flash.utils.getTimer;
public class FlashTest extends Sprite {
[Inline]
private static function max(a,b) {
return a>b ? a : b;
}
public function FlashTest() {
var tf = new TextField();
addChild(tf);
var t = getTimer();
for (var i=0; i<1000000; i++) {
var a = max(1,2);
}
tf.appendText((t-getTimer())+"\n");
var t = getTimer();
for (var i=0; i<1000000; i++) {
var a = Math.max(1,2);
}
tf.appendText((t-getTimer())+"\n");
}
}
}