Bug 16470 - Add IfElseNode and IfNoElseNode for speedup
Summary: Add IfElseNode and IfNoElseNode for speedup
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-17 02:37 PST by Eric Seidel (no email)
Modified: 2007-12-20 23:21 PST (History)
1 user (show)

See Also:


Attachments
Split IfElseNode from IfNode for speedup (6.79 KB, patch)
2007-12-17 03:07 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Split IfElseNode from IfNode for speedup (6.39 KB, patch)
2007-12-20 16:14 PST, Eric Seidel (no email)
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-12-17 02:37:18 PST
Add IfElseNode and IfNoElseNode for speedup

This would avoid a branch in each, causing a win for SunSpider.
Comment 1 Eric Seidel (no email) 2007-12-17 03:07:06 PST
Created attachment 17959 [details]
Split IfElseNode from IfNode for speedup

 JavaScriptCore/ChangeLog            |   22 ++++++++++++++
 JavaScriptCore/kjs/grammar.y        |    4 +-
 JavaScriptCore/kjs/nodes.cpp        |   53 ++++++++++++++++++++++------------
 JavaScriptCore/kjs/nodes.h          |   23 +++++++++++----
 JavaScriptCore/kjs/nodes2string.cpp |   10 ++++--
 5 files changed, 82 insertions(+), 30 deletions(-)
Comment 2 Eric Seidel (no email) 2007-12-17 03:22:47 PST
SunSpider claims this is slower on my machine, but I don't believe it.  I think it's just too noisy to tell.  Leaving it w/o review flag until I can prove otherwise however.
Comment 3 Eric Seidel (no email) 2007-12-20 04:54:19 PST
I'm still convinced this will be a win.  I'll test it again after darin's final patch for bug 16471 lands.
Comment 4 Eric Seidel (no email) 2007-12-20 16:14:06 PST
Created attachment 18018 [details]
Split IfElseNode from IfNode for speedup

 JavaScriptCore/ChangeLog            |   25 +++++++++++++++++++++++
 JavaScriptCore/kjs/grammar.y        |    4 +-
 JavaScriptCore/kjs/nodes.cpp        |   37 +++++++++++++++++++++-------------
 JavaScriptCore/kjs/nodes.h          |   22 +++++++++++++++-----
 JavaScriptCore/kjs/nodes2string.cpp |   10 ++++++--
 5 files changed, 73 insertions(+), 25 deletions(-)
Comment 5 Maciej Stachowiak 2007-12-20 16:23:42 PST
Comment on attachment 18018 [details]
Split IfElseNode from IfNode for speedup

r=me
Comment 6 Eric Seidel (no email) 2007-12-20 23:21:42 PST
r28929