Bug 46537 - SVG: Avoid calling pow() in genericParseNumber() unless necessary
Summary: SVG: Avoid calling pow() in genericParseNumber() unless necessary
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2010-09-24 16:26 PDT by Andreas Kling
Modified: 2010-09-26 10:46 PDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (1.24 KB, patch)
2010-09-24 16:28 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2010-09-24 16:26:49 PDT
We don't need to call pow() if there's no exponent.

0.4% speedup on <http://themaninblue.com/experiment/AnimationBenchmark/svg/>
Comment 1 Andreas Kling 2010-09-24 16:28:13 PDT
Created attachment 68787 [details]
Proposed patch
Comment 2 Kenneth Rohde Christiansen 2010-09-24 16:36:58 PDT
Comment on attachment 68787 [details]
Proposed patch

Nice !
Comment 3 WebKit Commit Bot 2010-09-24 18:57:24 PDT
Comment on attachment 68787 [details]
Proposed patch

Clearing flags on attachment: 68787

Committed r68321: <http://trac.webkit.org/changeset/68321>
Comment 4 WebKit Commit Bot 2010-09-24 18:57:29 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Matthew Delaney 2010-09-26 10:37:01 PDT
Just out of curiosity, how were you able to accurately/reliably measure a 0.4% speedup? Did you instrument the fps meter from that test to display some sort of longer run - and thus more steady - average?
Comment 6 Andreas Kling 2010-09-26 10:46:56 PDT
(In reply to comment #5)
> Just out of curiosity, how were you able to accurately/reliably measure a 0.4% speedup? Did you instrument the fps meter from that test to display some sort of longer run - and thus more steady - average?

Using an internal tool that runs something for X frames and measures wall/CPU time spent. Also, testing on a slow device helps a lot with the stability of timings.