[Webkit-unassigned] [Bug 19408] Constant folding in parser

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 26 03:36:04 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=19408


loki at inf.u-szeged.hu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22422|0                           |1
        is obsolete|                            |
  Attachment #22997|                            |review?
               Flag|                            |




------- Comment #17 from loki at inf.u-szeged.hu  2008-08-26 03:36 PDT -------
Created an attachment (id=22997)
 --> (https://bugs.webkit.org/attachment.cgi?id=22997&action=view)
Fold only *, +, <<, >>, ~ operators (v4)

(In reply to comment #16)
> As Geoff mentions, you should probably see what happens when you do constant
> folding for division. Why don't you fold the other bitwise operations.

When I have tried to fold divisions I had worse result than without it. The
same happened for other operators. If you like to see those cases and its
results also I will send it separately. 

I have just rechecked division, and now it performs better. So I have included
it into the patch.

> your own shouldBe() function? I don't see any reason why you can't use the
> standard one.

Because of rounding. When I used 'shouldBe' I have for example the following
fail:
FAIL  10.3   -  2.1 should be 8.2. Was 8.200000000000001.

> Other than that, it seems like a good patch. I apologize on behalf of the
> JavaScript team for not reviewing your patch earlier. 

No problem. I have also out of office.


So the attached patch is against rev 35930.

The SunSpider result is:
** TOTAL **:  -  From: 2890.3ms +/- 0.5%  To: 2884.8ms +/- 0.5%

for "*" operator:
  3d-cube:              118.9ms +/- 2.2%    118.4ms +/- 0.6%
  3d-raytrace:          120.4ms +/- 1.1%    121.4ms +/- 1.0%

for "<<" operator:
  crypto-aes:           53.6ms +/- 0.7%     53.7ms +/- 0.6%

for "+" operator:
  crypto-md5:           53.0ms +/- 0.6%     53.1ms +/- 0.4%
  crypto-sha1:          51.7ms +/- 0.9%     51.7ms +/- 0.7%

for "/" operator:
  math-partial-sums:    159.4ms +/- 2.0%    156.7ms +/- 1.2%


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list