summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorAndras <andras@kinvey.com>2016-04-27 20:31:59 -0400
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2016-06-29 11:02:25 +0200
commit6f75b6672ca08c2bc3bf5fe14abb1a9648601e28 (patch)
treefc67efa679a469f0ddfd8c46a4f03ee0bb457c2b /benchmark
parent6b0f86a8d519fd0780d2f6db2e7f28c2715dd795 (diff)
downloadandroid-node-v8-6f75b6672ca08c2bc3bf5fe14abb1a9648601e28.tar.gz
android-node-v8-6f75b6672ca08c2bc3bf5fe14abb1a9648601e28.tar.bz2
android-node-v8-6f75b6672ca08c2bc3bf5fe14abb1a9648601e28.zip
timers: optimize `setImmediate()`
Save the setImmediate() callback arguments into an array instead of a closure, and invoke the callback on the arguments from an optimizable function. 60% faster setImmediate with 0 args (15% if self-recursive) 4x faster setImmediate with 1-3 args, 2x with > 3 seems to be faster with less memory pressure when memory is tight Changes: - use L.create() to build faster lists - use runCallback() from within tryOnImmediate() - save the arguments and do not build closures for the callbacks PR-URL: https://github.com/nodejs/node/pull/6436 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'benchmark')
0 files changed, 0 insertions, 0 deletions