diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-20 20:47:28 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-20 20:47:28 -0700 |
commit | a5bb34ba04e1d17a59fda20f6a7e82c64f6ed6cc (patch) | |
tree | 38d57726e2e1ab1b11cb019f6687e3b5abed8bdb /tools/js-optimizer.js | |
parent | e258efc2aa3d52ff3c3d4f6ee03f6e71aca4f084 (diff) |
adjust outlining heuristics to fully outline even big functions
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r-- | tools/js-optimizer.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 24166aa8..810edd46 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -3327,9 +3327,9 @@ function outline(ast) { // (but only if the total costs are not extravagant) var currSize = measureSize(stats); var outlinedSize = measureSize(ret); - if (canRestart && currSize > sizeToOutline && sum(ret.map(function(newFunc) { + if (canRestart && currSize > 1.2*sizeToOutline && sum(ret.map(function(newFunc) { return costs[newFunc[1]] || 0; - })) < 0.1*sizeToOutline) { + })) < 0.5*originalSize) { printErr('restarting ' + func[1] + ' since ' + [currSize, outlinedSize, originalSize] + ' in level ' + level); lastSize = currSize; i = stats.length; |