Skip to content

Instantly share code, notes, and snippets.

@sidorares
Created September 27, 2013 02:31
Show Gist options
  • Save sidorares/6723433 to your computer and use it in GitHub Desktop.
Save sidorares/6723433 to your computer and use it in GitHub Desktop.
node.js empty loop optimisation test
[marking boo 0x168ec4f7ae88 for recompilation, reason: small function, ICs with typeinfo: 1/8 (12%)]
Analyzing block B0
Initial inferred range of 1 (Constant) set to [-2147483648,2147483647]
Initial inferred range of 54 (Constant) set to [1,1]
Initial inferred range of 15 (Constant) set to [-2147483648,2147483647]
Initial inferred range of 2 (ArgumentsObject) set to [-2147483648,2147483647]
Initial inferred range of 3 (Parameter) set to [-2147483648,2147483647]
Initial inferred range of 4 (Context) set to [-2147483648,2147483647]
Analyzing block B1
Initial inferred range of 10 (LoadGlobalCell) set to [-2147483648,2147483647]
Initial inferred range of 11 (PushArgument) set to [-2147483648,2147483647]
Initial inferred range of 12 (CallNamed) set to [-2147483648,2147483647]
Initial inferred range of 14 (Constant) set to [0,0]
Analyzing block B2
Initial inferred range of 21 (UnknownOSRValue) set to [-2147483648,2147483647]
Initial inferred range of 22 (UnknownOSRValue) set to [-2147483648,2147483647]
Initial inferred range of 23 (UnknownOSRValue) set to [-2147483648,2147483647]
Initial inferred range of 24 (UnknownOSRValue) set to [-2147483648,2147483647]
Initial inferred range of 27 (Context) set to [-2147483648,2147483647]
Initial inferred range of 73 (Change) set to [-2147483648,2147483647]
Analyzing block B3
Initial inferred range of 72 (Constant) set to [0,0]
Analyzing block B4
Initial inferred range of 30 (Phi) set to [-2147483648,2147483647]
Initial inferred range of 31 (Phi) set to [-2147483648,2147483647]
Initial inferred range of 32 (Phi) set to [-2147483648,2147483647]
Initial inferred range of 33 (Phi) set to [-2147483648,2147483647]
Initial inferred range of 74 (Constant) set to [10000000,10000000]
Analyzing block B5
Initial inferred range of 37 (Phi) set to [-2147483648,2147483647]
Analyzing block B6
Control flow range infer 37 LT 74
Updated range of 37 set to [-2147483648,9999999]
Original range was [-2147483648,2147483647]
New information was [-2147483648,9999999]
Control flow range infer 74 GT 37
Updated range of 74 set to [10000000,10000000]
Original range was [10000000,10000000]
New information was [10000000,10000000]
Analyzing block B7
Initial inferred range of 55 (Add) set to [-2147483647,10000000]
Analyzing block B8
Control flow range infer 37 GTE 74
Updated range of 37 set to [10000000,2147483647]
Original range was [-2147483648,2147483647]
New information was [10000000,2147483647]
Control flow range infer 74 LTE 37
Updated range of 74 set to [10000000,10000000]
Original range was [10000000,10000000]
New information was [10000000,10000000]
Analyzing block B9
Initial inferred range of 59 (GlobalObject) set to [-2147483648,2147483647]
Initial inferred range of 60 (LoadGlobalGeneric) set to [-2147483648,2147483647]
Initial inferred range of 62 (LoadGlobalCell) set to [-2147483648,2147483647]
Initial inferred range of 63 (PushArgument) set to [-2147483648,2147483647]
Initial inferred range of 64 (PushArgument) set to [-2147483648,2147483647]
Initial inferred range of 65 (CallNamed) set to [-2147483648,2147483647]
Initial inferred range of 67 (PushArgument) set to [-2147483648,2147483647]
Initial inferred range of 68 (PushArgument) set to [-2147483648,2147483647]
Initial inferred range of 69 (CallNamed) set to [-2147483648,2147483647]
[removing dead instruction t2 = ArgumentsObject ]
[optimizing: boo / 168ec4f7ae89 - took 0.130, 0.806, 0.000 ms]
[ 0, 21235665 ]
[ 0, 9947029 ]
[ 0, 10305158 ]
[ 0, 10176512 ]
[ 0, 9927092 ]
node --trace_range --trace_inlining --trace_dead_code_elimination --trace_parallel_recompilation --trace_opt test.js
function boo() {
var s = process.hrtime();
for (var i = 0; i < 10000000; i++) {
// nothing here
}
console.log(process.hrtime(s));
}
setInterval(boo, 2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment