Está en la página 1de 3

Not optimized

Optimized

i = 0;

var i:Number = 0;

uint

int

Math.PI;

3.141592653589793;

function f(x) {
var y:int = x+1; // ...
}

var y:int;
function f(x:Number):void {
y = x+1; // ...
}

var verylongvariablename;

var t;

a = Math.PI+Math.E;
b = Math.PI-Math.E;

var PI:Number = Math.PI;


var E:Number = Math.E;
a = PI+E);
b = PI-E;

a.x++;
a.y++;

with(a) {
x++;
y++;
}

for(var a=1; a<10; a++){}


for(var b=2; b<20; b++){}
for(var c=3; c<30; c++){}

var i:int;
for(i=1; i<10; i++){}
for(i=2; i<20; i++){}
for(i=3; i<30; i++){}

// tiles
for(var i:int=0;i<10;i++) {
for(var j:int=0;j<10;j++) {
}
}

var tilelist:Array=[];
for(var i:int=0;i<tilelist.length;i++) {
}

for(i=0; i<10; i++){


}

i = 0;
while(i<10){
i++;
}

X = 5/2;
X*2;

5*.5;
X+X;

var x:int = a*2;


var y:int = b*16;
var z:int = c/4;

var x:int = a << 1; //2^1 = 2


var y:int = b << 4; //2^4 = 16
var z:int = c >> 2; //2^2 = 4

Math.abs(X);

X<0 ? -X : X;

(X ^ (X >> 31)) - (X >> 31)

Math.floor(X);

int(X);

X>>0;

a = 25*Math.PI/180;
b = 50*Math.PI/180;
c = 75*Math.PI/180;

const rad:Number = Math.PI/180;


a = 25*rad;
b = 50*rad;
c = 75*rad;

var x:int = Math.ceil(a,b);

var x:int = (a<b) ? a : b;

// if n is a multiple of x
if (n % x == 0) {}

if (n & (x-1) == 0) {}

var element:int = matrix[i][j];

var row:Array = matrix[i];


var element:int = row[j];

for (var i=0;i<array.length;i++) {}

for (var i in array) {}

X += 1;

X++;

if (this) { do; } else { sleep; };

this ? do : sleep;

X*(X+1)

X*X+X

Math.pow(X,5)

X*X*X*X*X;

0.876;

.876;

var a:Array;
var b:Array;
var c:Array;
Function main(e:Event):void {
a = [];
b = [];
c = [];
}

var a:Array;
var b:Array;
var c:Array;
var empty:Array = [];
Function main(e:Event):void {
a = b = c = empty;
}

a = [[[1]]];
b = a[0][0][0]+a[0][0][0];

a = [[[1]]];
c = a[0][0][0]
b = c+c;

var f:Boolean = a<b ? true : false;


if (!f) {}

var f:Boolean = a<b ? false : true;


if (f) {}

var a:int = 0;
var b:Array = [1,1,1];
a += b[0]+b[1]+b[2];

var a:int = 0;
var b:int = 1;
var c:int = 1;
var d:int = 1;
a += b+c+d;

!a && !b

!(a || b)

// int
if(a>b-1) {}

if(a>=b) {}

var

const

... ? code : null;

if (...) { code }

var t:int = a;
a = b;
b = t;

a ^= b;
b ^= a;
a ^= b;

i = -~i;
i = ~-i;

i++
i--;

i = -i;

i = ~i + 1;
i = (i^-1)+1;

x = a % b;

x = a&(b-1);

(i % 2) == 0
// Parity: 1 2 3 4 5 6 7 8 9

(i & 1) == 0

i++;
(i*.5)<<0!==i*.5<<0 ? ... : ...;

i++;
i&1 ? ... : ...;

var s:String = ;
s += hello;

var s:String = ;
s = s+hello;

var a:Object = {X:5};


var c:int = o.X+o.X+o.X;

var a:Object = {X:5};


var b:int = a.X;
var c:int = b+b+b;

// testing optimization
for (var i:int=0;i<10000000;i++)
// code testing
}
trace(getTimer());

También podría gustarte

  • F
    F
    Documento38 páginas
    F
    Monik Pineda
    Aún no hay calificaciones
  • F
    F
    Documento38 páginas
    F
    SE Phulbani R&B Circle,Phulbani
    Aún no hay calificaciones
  • F
    F
    Documento82 páginas
    F
    Neeti Nepal
    Aún no hay calificaciones
  • F
    F
    Documento82 páginas
    F
    Cristhian Hernandez
    Aún no hay calificaciones
  • F
    F
    Documento38 páginas
    F
    paola gonzález
    Aún no hay calificaciones
  • F
    F
    Documento13 páginas
    F
    invecesarlino
    Aún no hay calificaciones
  • F
    F
    Documento40 páginas
    F
    Rohit Y
    Aún no hay calificaciones
  • F
    F
    Documento14 páginas
    F
    anhhuynh220803
    Aún no hay calificaciones
  • F
    F
    Documento39 páginas
    F
    Salma Rezzaki
    Aún no hay calificaciones
  • F
    F
    Documento13 páginas
    F
    zaide CB
    Aún no hay calificaciones
  • F
    F
    Documento13 páginas
    F
    Sándor Horváth
    Aún no hay calificaciones
  • F
    F
    Documento9 páginas
    F
    kaortega2277
    Aún no hay calificaciones
  • Insertion Sort
    Insertion Sort
    Documento19 páginas
    Insertion Sort
    Mungunsuvd
    Aún no hay calificaciones
  • Wormzone
    Wormzone
    Documento6 páginas
    Wormzone
    Aldin Tanael
    Aún no hay calificaciones
  • C Pracs
    C Pracs
    Documento22 páginas
    C Pracs
    16rock9999
    Aún no hay calificaciones
  • F
    F
    Documento38 páginas
    F
    RAMUNI RAMUNI
    Aún no hay calificaciones
  • F
    F
    Documento79 páginas
    F
    Phương Vũ
    Aún no hay calificaciones
  • F
    F
    Documento8 páginas
    F
    Jan Rey Lucasan
    Aún no hay calificaciones
  • F
    F
    Documento39 páginas
    F
    cv.alamagungperkasa mulia
    Aún no hay calificaciones
  • DS Lab
    DS Lab
    Documento17 páginas
    DS Lab
    GUHI
    Aún no hay calificaciones
  • F
    F
    Documento40 páginas
    F
    Necniv Odaravla Anin
    Aún no hay calificaciones
  • F
    F
    Documento39 páginas
    F
    Jesus Martin Gonzalez
    Aún no hay calificaciones
  • F
    F
    Documento38 páginas
    F
    lyyadav9197
    Aún no hay calificaciones
  • F
    F
    Documento38 páginas
    F
    w8srrgp7vw
    Aún no hay calificaciones
  • Poe
    Poe
    Documento39 páginas
    Poe
    1300000030.infantjesus
    Aún no hay calificaciones
  • F
    F
    Documento39 páginas
    F
    Б. Аюуш
    Aún no hay calificaciones
  • F
    F
    Documento39 páginas
    F
    zeffpizzzz
    Aún no hay calificaciones
  • F
    F
    Documento39 páginas
    F
    cba8029
    Aún no hay calificaciones
  • F
    F
    Documento7 páginas
    F
    Lan Nguyen
    Aún no hay calificaciones
  • Computer Graphics MANUAL
    Computer Graphics MANUAL
    Documento43 páginas
    Computer Graphics MANUAL
    Ayush Khandelwal
    100% (1)
  • F
    F
    Documento9 páginas
    F
    jimmy inga
    Aún no hay calificaciones
  • F
    F
    Documento9 páginas
    F
    guravareddy
    Aún no hay calificaciones
  • Rs AGLTc CMR 1 Jy GKbu Z1 YDvq PGH KG WBH 2 MZ SQ
    Rs AGLTc CMR 1 Jy GKbu Z1 YDvq PGH KG WBH 2 MZ SQ
    Documento64 páginas
    Rs AGLTc CMR 1 Jy GKbu Z1 YDvq PGH KG WBH 2 MZ SQ
    Doel Rahman
    Aún no hay calificaciones
  • F
    F
    Documento9 páginas
    F
    Nádia Viana
    Aún no hay calificaciones
  • C Program
    C Program
    Documento10 páginas
    C Program
    vigneshaaa
    Aún no hay calificaciones
  • Practice Desha
    Practice Desha
    Documento26 páginas
    Practice Desha
    haider_ali980
    Aún no hay calificaciones
  • F
    F
    Documento38 páginas
    F
    tokar
    Aún no hay calificaciones
  • F
    F
    Documento39 páginas
    F
    Yessy Riv
    Aún no hay calificaciones
  • F
    F
    Documento38 páginas
    F
    BearSon IR
    Aún no hay calificaciones
  • F
    F
    Documento38 páginas
    F
    Samuel Olojede
    Aún no hay calificaciones
  • F
    F
    Documento38 páginas
    F
    lebrina sapai
    Aún no hay calificaciones
  • F
    F
    Documento38 páginas
    F
    Cirlei Rodrigues
    Aún no hay calificaciones
  • F
    F
    Documento38 páginas
    F
    semfa.gc.cld
    Aún no hay calificaciones
  • C Language Test Predict The Output or Error(s) For The Following: Questions From 1 To 31
    C Language Test Predict The Output or Error(s) For The Following: Questions From 1 To 31
    Documento12 páginas
    C Language Test Predict The Output or Error(s) For The Following: Questions From 1 To 31
    Dinesh Kumar
    Aún no hay calificaciones
  • F
    F
    Documento81 páginas
    F
    Eidy luz Isaza jaramillo
    Aún no hay calificaciones
  • F
    F
    Documento81 páginas
    F
    Aishik Sarkar
    Aún no hay calificaciones
  • Data Structures and Algorithms
    Data Structures and Algorithms
    Documento21 páginas
    Data Structures and Algorithms
    Bruce Banner
    Aún no hay calificaciones
  • F
    F
    Documento39 páginas
    F
    Romaysa jiji
    Aún no hay calificaciones
  • F
    F
    Documento14 páginas
    F
    saraasseffar3
    Aún no hay calificaciones
  • NM Code
    NM Code
    Documento14 páginas
    NM Code
    ALINA LAMICHHANE
    Aún no hay calificaciones
  • Predict The Output or Error(s) For The Following
    Predict The Output or Error(s) For The Following
    Documento13 páginas
    Predict The Output or Error(s) For The Following
    bhushcoolmitsme8790
    Aún no hay calificaciones
  • F
    F
    Documento67 páginas
    F
    Esmy Cano
    Aún no hay calificaciones
  • F
    F
    Documento38 páginas
    F
    zulkarnainlaapo1976
    Aún no hay calificaciones
  • F
    F
    Documento41 páginas
    F
    Violeta Denisa Neagu
    Aún no hay calificaciones
  • CD Lab - Program
    CD Lab - Program
    Documento16 páginas
    CD Lab - Program
    api-434094364
    Aún no hay calificaciones
  • F
    F
    Documento7 páginas
    F
    Piero Purihuaman
    Aún no hay calificaciones
  • Gaxball
    Gaxball
    Documento189 páginas
    Gaxball
    Ricardo
    Aún no hay calificaciones
  • F
    F
    Documento9 páginas
    F
    merghadabdrafik
    Aún no hay calificaciones
  • Advanced C Concepts and Programming: First Edition
    Advanced C Concepts and Programming: First Edition
    De Everand
    Advanced C Concepts and Programming: First Edition
    Calificación: 3 de 5 estrellas
    3/5 (1)
  • Computer Engineering Laboratory Solution Primer
    Computer Engineering Laboratory Solution Primer
    De Everand
    Computer Engineering Laboratory Solution Primer
    Aún no hay calificaciones