Bug 145102

Summary: [JSC] Make StringRecursionChecker faster in the simple cases without any recursion
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Benjamin Poulain 2015-05-16 17:11:55 PDT
[JSC] Make StringRecursionChecker faster in the simple cases without any recursion
Comment 1 Benjamin Poulain 2015-05-16 17:19:31 PDT
Created attachment 253281 [details]
Patch
Comment 2 Darin Adler 2015-05-17 09:47:02 PDT
Comment on attachment 253281 [details]
Patch

I really like this optimization.

I wish, however, that instead of custom code we had a class that was “HashSet plus single element kept outside the set”. Then this fix would just be changing the class name from HashSet to that new class. In theory. If the class was designed and implemented tightly enough. I’d really like to be able to apply this kind of optimization trivially in various places.
Comment 3 Benjamin Poulain 2015-05-17 18:10:43 PDT
(In reply to comment #2)
> Comment on attachment 253281 [details]
> Patch
> 
> I really like this optimization.
> 
> I wish, however, that instead of custom code we had a class that was
> “HashSet plus single element kept outside the set”. Then this fix would just
> be changing the class name from HashSet to that new class. In theory. If the
> class was designed and implemented tightly enough. I’d really like to be
> able to apply this kind of optimization trivially in various places.

I believe Alex is working on that.
Comment 4 Benjamin Poulain 2015-05-17 23:23:35 PDT
Comment on attachment 253281 [details]
Patch

Clearing flags on attachment: 253281

Committed r184447: <http://trac.webkit.org/changeset/184447>
Comment 5 Benjamin Poulain 2015-05-17 23:23:40 PDT
All reviewed patches have been landed.  Closing bug.