Bug 130928 - LongSpider 3d-morph result check is inappropriate
Summary: LongSpider 3d-morph result check is inappropriate
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-03-29 11:14 PDT by Mark Lam
Modified: 2014-03-30 09:55 PDT (History)
8 users (show)

See Also:


Attachments
the patch. (11.73 KB, patch)
2014-03-29 11:30 PDT, Mark Lam
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2014-03-29 11:14:23 PDT
The LongSpider expected value test in the 3d-morph component is incorrect.  It should based on error tolerances instead.  The existing test checks if the leading digit of a sum starts with "-1”.  However, it turned out that the expected sum is in the order of -1.8735013540549517e-16 (i.e. very close to 0).

The fix is to do an tolerance check on all the terms of the sum, as well as the total sum value instead.  The tolerance is more lenient for the sum which accumulates error from the individual terms.
Comment 1 Mark Lam 2014-03-29 11:15:00 PDT
<rdar://problem/16465776>
Comment 2 Mark Lam 2014-03-29 11:30:24 PDT
Created attachment 228111 [details]
the patch.
Comment 3 Filip Pizlo 2014-03-29 21:38:59 PDT
Comment on attachment 228111 [details]
the patch.

What is the running time of this test before and after your change?
Comment 4 Mark Lam 2014-03-29 21:57:37 PDT
(In reply to comment #3)
> (From update of attachment 228111 [details])
> What is the running time of this test before and after your change?

3 runs of LongSpider 3d-morph each for before and after (x86_64 on a MBA):

Before:
   3d-morph           1252.2394+-34.5523   
   3d-morph           1253.3269+-55.5660   
   3d-morph           1264.6942+-91.1279   

After:
   3d-morph           1238.6026+-6.3175    
   3d-morph           1253.9030+-54.6123   
   3d-morph           1253.1157+-20.7673   

I’d say it’s a wash.
Comment 5 Mark Lam 2014-03-30 09:55:01 PDT
Thanks for the review.  Landed in r166462: <http://trac.webkit.org/r166462>.