Commit d3654d80 authored by Brian White's avatar Brian White Committed by Jeremiah Senkpiel
Browse files

timers: improve setImmediate() performance

This commit improves setImmediate() performance by moving the
try-finally block that wraps callback execution into a separate
function because currently v8 never tries to optimize functions
that contain try-finally blocks.

With this change, there is a ~20-40% improvement in the included
setImmediate() depth benchmarks. The breadth benchmarks show a slight
improvement.

PR-URL: https://github.com/nodejs/node/pull/4169


Reviewed-By: default avatarMinwoo Jung <jmwsoft@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarJeremiah Senkpiel <fishrock123@rocketmail.com>
parent b1a48702
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment