mirror of https://github.com/svaarala/duktape.git
Sami Vaarala
8 years ago
committed by
GitHub
2 changed files with 92 additions and 0 deletions
@ -0,0 +1,46 @@ |
|||
/* |
|||
* Fastint equality comparison. |
|||
*/ |
|||
function test() { |
|||
var i, x, y; |
|||
|
|||
x = 1; y = 2; |
|||
for (i = 0; i < 1e6; i++) { |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
} |
|||
} |
|||
|
|||
try { |
|||
test(); |
|||
} catch (e) { |
|||
print(e.stack || e); |
|||
throw e; |
|||
} |
@ -0,0 +1,46 @@ |
|||
/* |
|||
* Non-fastint equality comparison. |
|||
*/ |
|||
function test() { |
|||
var i, x, y; |
|||
|
|||
x = 1.1; y = 2.2; |
|||
for (i = 0; i < 1e6; i++) { |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
|
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
void (x == y); void (x == y); void (x == y); void (x == y); void (x == y); |
|||
} |
|||
} |
|||
|
|||
try { |
|||
test(); |
|||
} catch (e) { |
|||
print(e.stack || e); |
|||
throw e; |
|||
} |
Loading…
Reference in new issue