Created
March 16, 2010 10:20
-
-
Save mnem/333822 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function speedTestA() :void | |
{ | |
var a :int = 1; | |
var b :int = 2; | |
b = a + a + a; | |
} | |
public function speedTestB() :void | |
{ | |
var a :int = 1; | |
var b :int = 2; | |
b = a + a; | |
b += a; | |
} | |
// Bytecode for the above functions: | |
// | |
// function performancetests:Test:::speedTestA()::void | |
// maxStack:2 localCount:3 initScopeDepth:4 maxScopeDepth:5 | |
// getlocal0 | |
// pushscope | |
// pushbyte 1 | |
// setlocal1 | |
// pushbyte 2 | |
// setlocal2 | |
// getlocal1 | |
// getlocal1 | |
// add | |
// getlocal1 | |
// add | |
// convert_i | |
// setlocal2 | |
// returnvoid | |
// 0 Extras | |
// 0 Traits Entries | |
// | |
// function performancetests:Test:::speedTestB()::void | |
// maxStack:2 localCount:3 initScopeDepth:4 maxScopeDepth:5 | |
// getlocal0 | |
// pushscope | |
// pushbyte 1 | |
// setlocal1 | |
// pushbyte 2 | |
// setlocal2 | |
// getlocal1 | |
// getlocal1 | |
// add | |
// convert_i | |
// setlocal2 | |
// getlocal2 | |
// getlocal1 | |
// add | |
// convert_i | |
// setlocal2 | |
// returnvoid | |
// 0 Extras | |
// 0 Traits Entries |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment