Review Request 108946: kjs: Extend PropertySlot like JSC does, introduce new GetValueNumberFunc
Commit Hook
null at kde.org
Sat Mar 30 15:14:53 GMT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108946/
-----------------------------------------------------------
(Updated March 30, 2013, 3:14 p.m.)
Status
------
This change has been marked as submitted.
Review request for kdelibs.
Description
-------
kjs: Extend PropertySlot like JSC does, introduce new GetValueNumberFunc to
avoid doing unneeded Identifier::from(unsigned) if we already know its an unsigned.
Before we used to do something like:
store unsigned -> Identifier::from(unsigned) -> call -> Identifier.toArrayIndex to get the unsigned again -> use unsigned
now:
store unsigned -> call -> use unsigned.
The pure Identifier/"String" case is unchanged.
Also (like JSC too) add function to directly store the Value, this avoids extra function call.
Now we no longer need to create a static GetValueFunc for getting a tiny value. (less code, more fun)
This overall improves the performance for kjs:
with SunSpider 1.0-svn, (less is better, 3*10 runs)
before: 2887.5ms, 2836.9ms, 2865.4ms
after: 2748.5ms, 2756.4ms, 2747.3ms
octane benchmark (more is better)
before score: 225
after score: 272
and most important not a single testcase got slower.
For typed-arrays, my extra bloated worstcase bubble sort testcase (less is better)
before: ~44sec
after: ~18sec
Diffs
-----
khtml/ecma/kjs_arraybufferview.h PRE-CREATION
khtml/ecma/kjs_binding.h b967744
kjs/property_slot.h d59d0a6
kjs/string_object.h 3158d2f
kjs/string_object.cpp 0d10e53
Diff: http://git.reviewboard.kde.org/r/108946/diff/
Testing
-------
Thanks,
Bernd Buschinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130330/b5bc9105/attachment.htm>
More information about the kde-core-devel
mailing list