[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Review Request 108946: kjs: Extend PropertySlot like JSC does, introduce new GetValueNumberFunc
From:       "Bernd Buschinski" <b.buschinski () googlemail ! com>
Date:       2013-02-13 20:19:05
Message-ID: 20130213201905.12616.5401 () vidsolbach ! de
[Download RAW message or body]

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108946/
-----------------------------------------------------------

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


[Attachment #3 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/108946/">http://git.reviewboard.kde.org/r/108946/</a>
  </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kdelibs.</div>
<div>By Bernd Buschinski.</div>







<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">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 -&gt; Identifier::from(unsigned) -&gt;  call -&gt; \
Identifier.toArrayIndex to get the unsigned again -&gt; use unsigned now:
store unsigned -&gt; call -&gt; use unsigned.
The pure Identifier/&quot;String&quot; 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
</pre>
  </td>
 </tr>
</table>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>khtml/ecma/kjs_arraybufferview.h <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>khtml/ecma/kjs_binding.h <span style="color: grey">(b967744)</span></li>

 <li>kjs/property_slot.h <span style="color: grey">(d59d0a6)</span></li>

 <li>kjs/string_object.h <span style="color: grey">(3158d2f)</span></li>

 <li>kjs/string_object.cpp <span style="color: grey">(0d10e53)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/108946/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic