Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1171)

Unified Diff: src/third_party/fdlibm/fdlibm.js

Issue 866553003: Allocate typed array for rempio2 result. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: make runtime call slightly faster. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/runtime/runtime-maths.cc ('K') | « src/runtime/runtime-maths.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/third_party/fdlibm/fdlibm.js
diff --git a/src/third_party/fdlibm/fdlibm.js b/src/third_party/fdlibm/fdlibm.js
index ceeacc59bbf313b850035dcd35c1feb5f97e0362..072cb6dbaf08ac98070d82446ce235cf165adb4e 100644
--- a/src/third_party/fdlibm/fdlibm.js
+++ b/src/third_party/fdlibm/fdlibm.js
@@ -24,6 +24,7 @@
"use strict";
var kMath;
+var rempio2result;
Sven Panne 2015/02/06 07:37:28 Extend the comment above.
const INVPIO2 = kMath[0];
const PIO2_1 = kMath[1];
@@ -38,6 +39,7 @@ const PIO4LO = kMath[33];
// Compute k and r such that x - k*pi/2 = r where |r| < pi/4. For
// precision, r is returned as two values y0 and y1 such that r = y0 + y1
// to more than double precision.
+
macro REMPIO2(X)
var n, y0, y1;
var hx = %_DoubleHi(X);
@@ -105,10 +107,9 @@ macro REMPIO2(X)
}
} else {
// Need to do full Payne-Hanek reduction here.
- var r = %RemPiO2(X);
- n = r[0];
- y0 = r[1];
- y1 = r[2];
+ n = %RemPiO2(X, rempio2result);
+ y0 = rempio2result[0];
+ y1 = rempio2result[1];
}
endmacro
« src/runtime/runtime-maths.cc ('K') | « src/runtime/runtime-maths.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698