Skip to content

vm: improve performance of vm.runIn*()#10816

Closed
Trott wants to merge 3 commits intonodejs:masterfrom
Trott:optimize-vm
Closed

vm: improve performance of vm.runIn*()#10816
Trott wants to merge 3 commits intonodejs:masterfrom
Trott:optimize-vm

Conversation

@Trott
Copy link
Member

@Trott Trott commented Jan 15, 2017

Optimize for common cases in vm.runInContext() and vm.runInThisContext() when breakOnSigint is set.

$ node benchmark/compare.js --set 'n=10'  --old './node-old' --new './node-new' vm > bench.csv
$ cat bench.csv | Rscript benchmark/compare.R bench
                                                                     improvement confidence      p.value
 vm/run-in-context.js withSigintListener=0 breakOnSigint=0 n=10           1.12 %            0.5268470825
 vm/run-in-context.js withSigintListener=0 breakOnSigint=1 n=10           6.90 %         ** 0.0039743927
 vm/run-in-context.js withSigintListener=1 breakOnSigint=0 n=10           5.19 %        *** 0.0001940968
 vm/run-in-context.js withSigintListener=1 breakOnSigint=1 n=10          -0.84 %            0.6936019893
 vm/run-in-this-context.js withSigintListener=0 breakOnSigint=0 n=10      0.14 %            0.9651596335
 vm/run-in-this-context.js withSigintListener=0 breakOnSigint=1 n=10      9.27 %         ** 0.0058309681
 vm/run-in-this-context.js withSigintListener=1 breakOnSigint=0 n=10      1.13 %            0.5957890149
 vm/run-in-this-context.js withSigintListener=1 breakOnSigint=1 n=10      2.21 %            0.2564659136
$ 
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

vm benchmark

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmark Issues and PRs related to the benchmark subsystem. performance Issues and PRs related to the performance of Node.js. vm Issues and PRs related to the vm subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants