WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
80654
Allocate the RegExpObject's data with the Cell
https://bugs.webkit.org/show_bug.cgi?id=80654
Summary
Allocate the RegExpObject's data with the Cell
Benjamin Poulain
Reported
2012-03-08 16:26:17 PST
Currently, RegExpObject's data is allocated with new() in the constructor. This is a problem in peacekeeper. In that case, the tests repeatedly create very small and simple regexp, and use them only one. Currently, the allocation and destruction of RegExpObjectData take more time than the math() itself.
Attachments
Patch
(9.83 KB, patch)
2012-03-08 16:34 PST
,
Benjamin Poulain
barraclough
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Benjamin Poulain
Comment 1
2012-03-08 16:34:53 PST
Created
attachment 130938
[details]
Patch
Benjamin Poulain
Comment 2
2012-03-08 16:37:56 PST
I also tried Sunspider but there is no change. While trying this, I also noticed JSNonFinalObject has some spare memory: WriteBarrierBase<Unknown> m_inlineStorage[JSFinalObject_inlineStorageCapacity]; Since I am not familiar with that, I did not abuse it to store anything from RegExp. I don't know if anything could be done there?
Gavin Barraclough
Comment 3
2012-03-08 17:14:06 PST
(In reply to
comment #2
)
> I also tried Sunspider but there is no change. > > While trying this, I also noticed JSNonFinalObject has some spare memory: > WriteBarrierBase<Unknown> m_inlineStorage[JSFinalObject_inlineStorageCapacity]; > Since I am not familiar with that, I did not abuse it to store anything from RegExp. I don't know if anything could be done there?
We used to have a concept of 'anonymous slots', to allocate storage within the object's property storage, but I think that has been removed. ES6 will require support for 'private names', we may be able to use these to store internal values (e.g. the regexp) – once we have a mechanism to support this implemented! Right now, no obvious clean way to use the internal property storage springs to mind.
Benjamin Poulain
Comment 4
2012-03-08 22:50:51 PST
Committed
r110266
: <
http://trac.webkit.org/changeset/110266
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug