Bug 15860 - add() could use additional speedups
Summary: add() could use additional speedups
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 15837
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-06 10:57 PST by Eric Seidel (no email)
Modified: 2009-03-24 11:27 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-11-06 10:57:47 PST
add() could use additional speedups

Some suggestions brought up in bug 15837 but not implemented, include:

1.  Combine both types into a "type mask" using uint32_t typeMask = t1 << 3 | t2; and then check the resulting type mask instead of t1 == StringType && t2 == StringType
2.  Speed up addSlowCase by passing in the typeMask and only calling toPrimative when needed
3.  Speed up addSlowCase by avoiding calling toString() and using static_cast<StringImp*>(foo)->value() when possible.
Comment 1 Darin Adler 2007-11-08 23:00:09 PST
Oliver did (1) already.
Comment 2 Eric Seidel (no email) 2007-11-09 00:49:28 PST
This will actually be fixed more by bug 15884.  I'm going to re-write AddNode into specialized versions to exploit at least #3.  #2 becomes irrelevant.
Comment 3 Alexey Proskuryakov 2009-03-24 10:59:08 PDT
Eric, is this bug still valid?

/me sounds like a broken record, yeah
Comment 4 Eric Seidel (no email) 2009-03-24 11:27:39 PDT
I don't think JSC code looks anything like this anymore.  But I've not hacked on it in over a year now. :(