Title: [90317] trunk/PerformanceTests/SunSpider
Revision
90317
Author
[email protected]
Date
2011-07-02 13:45:55 -0700 (Sat, 02 Jul 2011)

Log Message

2011-07-02  Maciej Stachowiak  <[email protected]>

        Reviewed by Darin Adler.

        SunSpider: The main function of math-cordic is dead code
        https://bugs.webkit.org/show_bug.cgi?id=63863
        
        Try to prevent math-cordic from being eliminated as dead code or
        compiled down to a constant.

        * tests/sunspider-1.0/math-cordic.js:
        (cordicsincos):
        (cordic):

Modified Paths

Diff

Modified: trunk/PerformanceTests/SunSpider/ChangeLog (90316 => 90317)


--- trunk/PerformanceTests/SunSpider/ChangeLog	2011-07-02 17:26:21 UTC (rev 90316)
+++ trunk/PerformanceTests/SunSpider/ChangeLog	2011-07-02 20:45:55 UTC (rev 90317)
@@ -1,3 +1,17 @@
+2011-07-02  Maciej Stachowiak  <[email protected]>
+
+        Reviewed by Darin Adler.
+
+        SunSpider: The main function of math-cordic is dead code
+        https://bugs.webkit.org/show_bug.cgi?id=63863
+        
+        Try to prevent math-cordic from being eliminated as dead code or
+        compiled down to a constant.
+
+        * tests/sunspider-1.0/math-cordic.js:
+        (cordicsincos):
+        (cordic):
+
 2011-06-30  Maciej Stachowiak  <[email protected]>
 
         Reviewed by Adam Barth.

Modified: trunk/PerformanceTests/SunSpider/tests/sunspider-1.0/math-cordic.js (90316 => 90317)


--- trunk/PerformanceTests/SunSpider/tests/sunspider-1.0/math-cordic.js	2011-07-02 17:26:21 UTC (rev 90316)
+++ trunk/PerformanceTests/SunSpider/tests/sunspider-1.0/math-cordic.js	2011-07-02 20:45:55 UTC (rev 90317)
@@ -49,8 +49,9 @@
   FIXED(0.027977) 
               ];
 
+var Target = 28.027;
 
-function cordicsincos() {
+function cordicsincos(Target) {
     var X;
     var Y;
     var TargetAngle;
@@ -60,7 +61,7 @@
     X = FIXED(AG_CONST);         /* AG_CONST * cos(0) */
     Y = 0;                       /* AG_CONST * sin(0) */
 
-    TargetAngle = FIXED(28.027);
+    TargetAngle = FIXED(Target);
     CurrAngle = 0;
     for (Step = 0; Step < 12; Step++) {
         var NewX;
@@ -76,15 +77,19 @@
             CurrAngle -= Angles[Step];
         }
     }
+
+    return FLOAT(X) * FLOAT(Y);
 }
 
 ///// End CORDIC
 
+var total = 0;
+
 function cordic( runs ) {
   var start = new Date();
 
   for ( var i = 0 ; i < runs ; i++ ) {
-      cordicsincos();
+      total += cordicsincos(Target);
   }
 
   var end = new Date();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to