Benchmarking with jit is complicated, here are results using d8:
d8 --jitless vector3FromArrayToRefOptimizedNoWarmUp.js
>..\d8 --jitless vector3FromArrayToRefOptimizedNoWarmUp.js
Warning: disabling flag --expose_wasm due to conflicting flags
1
2
start bench
11417.422999999995
d8 --jitless vector3FromArrayToRefNoWarmUp.js
>..\d8 --jitless vector3FromArrayToRefNoWarmUp.js
Warning: disabling flag --expose_wasm due to conflicting flags
1
2
start bench
18580.589
d8 --trace-deopt --trace-opt-verbose vector3FromArrayToRefOptimized.js
>..\d8 --trace-deopt --trace-opt-verbose vector3FromArrayToRefOptimized.js
[not yet optimizing d, not enough ticks: 1/3 and ICs changed]
[marking 0x00e000a200fd <JSFunction e.o (sfi = 000000E000788A49)> for optimization to TURBOFAN, ConcurrencyMode::kConcurrent, reason: small function]
[compiling method 0x00e000a200fd <JSFunction e.o (sfi = 000000E000788A49)> (target TURBOFAN), mode: ConcurrencyMode::kConcurrent]
[completed compiling 0x00e000a200fd <JSFunction e.o (sfi = 000000E000788A49)> (target TURBOFAN) - took 0.067, 3.097, 0.286 ms]
[completed optimizing 0x00e000a200fd <JSFunction e.o (sfi = 000000E000788A49)> (target TURBOFAN)]
[not yet optimizing d, not enough ticks: 2/3 and too large for small function optimization: 103/81]
[not yet optimizing G, not enough ticks: 1/4 and ICs changed]
[resetting ticks for 0x00e000786771 <SharedFunctionInfo G> from 1 due to IC change: Monomorphic]
[not yet optimizing , not enough ticks: 1/4 and ICs changed]
[not yet optimizing , not enough ticks: 2/4 and too large for small function optimization: 229/81]
[not yet optimizing , not enough ticks: 3/4 and too large for small function optimization: 229/81]
[marking 0x00e00025a215 <JSFunction (sfi = 000000E000259E55)> for optimization to TURBOFAN, ConcurrencyMode::kConcurrent, reason: hot and stable]
[compiling method 0x00e00025a215 <JSFunction (sfi = 000000E000259E55)> (target TURBOFAN) OSR, mode: ConcurrencyMode::kConcurrent]
[completed compiling 0x00e00025a215 <JSFunction (sfi = 000000E000259E55)> (target TURBOFAN) OSR - took 0.042, 2.844, 0.060 ms]
[completed optimizing 0x00e00025a215 <JSFunction (sfi = 000000E000259E55)> (target TURBOFAN) OSR]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for generic named access): begin. deoptimizing 0x00e00025a215 <JSFunction (sfi = 000000E000259E55)>, 0x7ff900004141 <InstructionStream TURBOFAN>, opt id 1, node id 66, bytecode offset 86, deopt exit 8, FP to SP delta 128, caller SP 0x0000005fea98, pc 0x7ff900004431]
[resetting ticks for 0x00e000259e55 <SharedFunctionInfo> from 5 due to IC change: Monomorphic]
1
[not yet optimizing benchmarkVector3, not enough ticks: 1/4 and ICs changed]
[marking 0x00e00025a295 <JSFunction vector3FromArrayToRefOptimized (sfi = 000000E000259EED)> for optimization to TURBOFAN, ConcurrencyMode::kConcurrent, reason: small function]
[compiling method 0x00e00025a295 <JSFunction vector3FromArrayToRefOptimized (sfi = 000000E000259EED)> (target TURBOFAN), mode: ConcurrencyMode::kConcurrent]
[completed compiling 0x00e00025a295 <JSFunction vector3FromArrayToRefOptimized (sfi = 000000E000259EED)> (target TURBOFAN) - took 0.040, 1.982, 0.057 ms]
[completed optimizing 0x00e00025a295 <JSFunction vector3FromArrayToRefOptimized (sfi = 000000E000259EED)> (target TURBOFAN)]
[not yet optimizing benchmarkVector3, not enough ticks: 2/4 and too large for small function optimization: 188/81]
[not yet optimizing benchmarkVector3, not enough ticks: 3/4 and too large for small function optimization: 188/81]
[marking 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> for optimization to TURBOFAN, ConcurrencyMode::kConcurrent, reason: hot and stable]
[compiling method 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) OSR, mode: ConcurrencyMode::kConcurrent]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[completed compiling 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) OSR - took 0.058, 5.121, 0.089 ms]
[completed optimizing 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) OSR]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for unary operation): begin. deoptimizing 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)>, 0x7ff900004781 <InstructionStream TURBOFAN>, opt id 3, node id 114, bytecode offset 70, deopt exit 22, FP to SP delta 232, caller SP 0x0000005fea30, pc 0x7ff900004e3f]
[compiling method 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) OSR, mode: ConcurrencyMode::kConcurrent]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[completed compiling 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) OSR - took 0.026, 11.756, 0.137 ms]
[completed optimizing 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) OSR]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for generic named access): begin. deoptimizing 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)>, 0x7ff900004ec1 <InstructionStream TURBOFAN>, opt id 4, node id 278, bytecode offset 81, deopt exit 44, FP to SP delta 232, caller SP 0x0000005fea30, pc 0x7ff900005c24]
[resetting ticks for 0x00e000259f25 <SharedFunctionInfo benchmarkVector3> from 8 due to IC change: Monomorphic]
[compiling method 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) OSR, mode: ConcurrencyMode::kConcurrent]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[completed compiling 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) OSR - took 0.027, 7.836, 0.090 ms]
[completed optimizing 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) OSR]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for unary operation): begin. deoptimizing 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)>, 0x7ff900005d01 <InstructionStream TURBOFAN>, opt id 5, node id 115, bytecode offset 161, deopt exit 22, FP to SP delta 232, caller SP 0x0000005fea30, pc 0x7ff9000063bf]
[compiling method 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) OSR, mode: ConcurrencyMode::kConcurrent]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[completed compiling 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) OSR - took 0.027, 10.782, 0.158 ms]
[completed optimizing 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) OSR]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for call): begin. deoptimizing 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)>, 0x7ff900006441 <InstructionStream TURBOFAN>, opt id 6, node id 285, bytecode offset 177, deopt exit 44, FP to SP delta 232, caller SP 0x0000005fea30, pc 0x7ff9000071a5]
2
[compiling method 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN), mode: ConcurrencyMode::kConcurrent]
[completed compiling 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN) - took 0.033, 14.043, 0.155 ms]
[completed optimizing 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)> (target TURBOFAN)]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for generic named access): begin. deoptimizing 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)>, 0x7ff900004ec1 <InstructionStream TURBOFAN>, opt id 4, node id 278, bytecode offset 81, deopt exit 44, FP to SP delta 232, caller SP 0x0000005fea30, pc 0x7ff900005c24]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for call): begin. deoptimizing 0x00e00025a2c9 <JSFunction benchmarkVector3 (sfi = 000000E000259F25)>, 0x7ff900006441 <InstructionStream TURBOFAN>, opt id 6, node id 285, bytecode offset 177, deopt exit 44, FP to SP delta 232, caller SP 0x0000005fea30, pc 0x7ff9000071a5]
start bench
39.6880000000001
d8 --trace-deopt --trace-opt-verbose vector3FromArrayToRef.js
>..\d8 --trace-deopt --trace-opt-verbose vector3FromArrayToRef.js
[not yet optimizing d, not enough ticks: 1/3 and ICs changed]
[marking 0x006100a200fd <JSFunction e.o (sfi = 0000006100788A49)> for optimization to TURBOFAN, ConcurrencyMode::kConcurrent, reason: small function]
[compiling method 0x006100a200fd <JSFunction e.o (sfi = 0000006100788A49)> (target TURBOFAN), mode: ConcurrencyMode::kConcurrent]
[completed compiling 0x006100a200fd <JSFunction e.o (sfi = 0000006100788A49)> (target TURBOFAN) - took 0.075, 2.282, 0.299 ms]
[completed optimizing 0x006100a200fd <JSFunction e.o (sfi = 0000006100788A49)> (target TURBOFAN)]
[not yet optimizing d, not enough ticks: 2/3 and too large for small function optimization: 103/81]
[not yet optimizing G, not enough ticks: 1/4 and ICs changed]
[resetting ticks for 0x006100786771 <SharedFunctionInfo G> from 1 due to IC change: Monomorphic]
[not yet optimizing , not enough ticks: 1/4 and ICs changed]
[not yet optimizing , not enough ticks: 2/4 and too large for small function optimization: 229/81]
[not yet optimizing , not enough ticks: 3/4 and too large for small function optimization: 229/81]
[marking 0x00610025a211 <JSFunction (sfi = 0000006100259E4D)> for optimization to TURBOFAN, ConcurrencyMode::kConcurrent, reason: hot and stable]
[compiling method 0x00610025a211 <JSFunction (sfi = 0000006100259E4D)> (target TURBOFAN) OSR, mode: ConcurrencyMode::kConcurrent]
[completed compiling 0x00610025a211 <JSFunction (sfi = 0000006100259E4D)> (target TURBOFAN) OSR - took 0.031, 3.083, 0.055 ms]
[completed optimizing 0x00610025a211 <JSFunction (sfi = 0000006100259E4D)> (target TURBOFAN) OSR]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for generic named access): begin. deoptimizing 0x00610025a211 <JSFunction (sfi = 0000006100259E4D)>, 0x7ff900004141 <InstructionStream TURBOFAN>, opt id 1, node id 66, bytecode offset 86, deopt exit 8, FP to SP delta 128, caller SP 0x0000005fea98, pc 0x7ff900004431]
[resetting ticks for 0x006100259e4d <SharedFunctionInfo> from 5 due to IC change: Monomorphic]
1
[not yet optimizing benchmarkVector3, not enough ticks: 1/4 and ICs changed]
[marking 0x00610025a291 <JSFunction vector3FromArrayToRef (sfi = 0000006100259EE5)> for optimization to TURBOFAN, ConcurrencyMode::kConcurrent, reason: small function]
[compiling method 0x00610025a291 <JSFunction vector3FromArrayToRef (sfi = 0000006100259EE5)> (target TURBOFAN), mode: ConcurrencyMode::kConcurrent]
[completed compiling 0x00610025a291 <JSFunction vector3FromArrayToRef (sfi = 0000006100259EE5)> (target TURBOFAN) - took 0.043, 2.905, 0.080 ms]
[completed optimizing 0x00610025a291 <JSFunction vector3FromArrayToRef (sfi = 0000006100259EE5)> (target TURBOFAN)]
[not yet optimizing benchmarkVector3, not enough ticks: 2/4 and too large for small function optimization: 188/81]
[not yet optimizing benchmarkVector3, not enough ticks: 3/4 and too large for small function optimization: 188/81]
[marking 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> for optimization to TURBOFAN, ConcurrencyMode::kConcurrent, reason: hot and stable]
[compiling method 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) OSR, mode: ConcurrencyMode::kConcurrent]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[completed compiling 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) OSR - took 0.028, 6.685, 0.104 ms]
[completed optimizing 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) OSR]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for unary operation): begin. deoptimizing 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)>, 0x7ff900004781 <InstructionStream TURBOFAN>, opt id 3, node id 114, bytecode offset 70, deopt exit 22, FP to SP delta 232, caller SP 0x0000005fea30, pc 0x7ff900004e38]
[compiling method 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) OSR, mode: ConcurrencyMode::kConcurrent]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[completed compiling 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) OSR - took 0.031, 12.668, 0.134 ms]
[completed optimizing 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) OSR]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for generic named access): begin. deoptimizing 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)>, 0x7ff900004ec1 <InstructionStream TURBOFAN>, opt id 4, node id 278, bytecode offset 81, deopt exit 44, FP to SP delta 232, caller SP 0x0000005fea30, pc 0x7ff900005c25]
[resetting ticks for 0x006100259f1d <SharedFunctionInfo benchmarkVector3> from 10 due to IC change: Monomorphic]
[compiling method 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) OSR, mode: ConcurrencyMode::kConcurrent]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[completed compiling 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) OSR - took 0.026, 5.795, 0.093 ms]
[completed optimizing 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) OSR]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for unary operation): begin. deoptimizing 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)>, 0x7ff900005d01 <InstructionStream TURBOFAN>, opt id 5, node id 115, bytecode offset 161, deopt exit 22, FP to SP delta 232, caller SP 0x0000005fea30, pc 0x7ff9000063b8]
[compiling method 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) OSR, mode: ConcurrencyMode::kConcurrent]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[not marking function benchmarkVector3 (BASELINE) for optimization: already queued]
[completed compiling 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) OSR - took 0.028, 11.859, 0.138 ms]
[completed optimizing 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) OSR]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for call): begin. deoptimizing 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)>, 0x7ff900006441 <InstructionStream TURBOFAN>, opt id 6, node id 285, bytecode offset 177, deopt exit 44, FP to SP delta 232, caller SP 0x0000005fea30, pc 0x7ff9000071ab]
2
[compiling method 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN), mode: ConcurrencyMode::kConcurrent]
[completed compiling 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN) - took 0.028, 9.595, 0.134 ms]
[completed optimizing 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)> (target TURBOFAN)]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for generic named access): begin. deoptimizing 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)>, 0x7ff900004ec1 <InstructionStream TURBOFAN>, opt id 4, node id 278, bytecode offset 81, deopt exit 44, FP to SP delta 232, caller SP 0x0000005fea30, pc 0x7ff900005c25]
[bailout (kind: deopt-eager, reason: Insufficient type feedback for call): begin. deoptimizing 0x00610025a2c5 <JSFunction benchmarkVector3 (sfi = 0000006100259F1D)>, 0x7ff900006441 <InstructionStream TURBOFAN>, opt id 6, node id 285, bytecode offset 177, deopt exit 44, FP to SP delta 232, caller SP 0x0000005fea30, pc 0x7ff9000071ab]
start bench
50.815000000000055
Code for this:
js.zip (892.5 KB)
In jitless mode, warmup is disabled since it would take a long time.
The version of v8: v8-win64-dbg-11.1.237.zip