https://codereview.chromium.org/50563003/diff/80001/src/math.js
File src/math.js (right):

https://codereview.chromium.org/50563003/diff/80001/src/math.js#newcode207
src/math.js:207: var MathSinImpl = function(x) {
On 2013/10/30 07:51:56, Sven Panne wrote:
Why do we do this "poor man's lazy evaluation" instead of initializing
the
tables directly at startup? This would have the additional benefit
that the
table is directly in the snapshot, and things would be much clearer
and simpler.

The thinking was that trigonometric functions are not important enough
to warrant the snapshot/binary size increase. FWIW, Math.exp also
follows the pattern of initializing the lookup table on first use. A
potential follow-up CL is to entirely skip using lookup tables when
FLAG_optimize_for_size, e.g. by using direct uncached library calls.

https://codereview.chromium.org/50563003/diff/80001/src/math.js#newcode221
src/math.js:221: var pi = 3.1415926535897932;
Does it make a speed difference if you move all these constants into the
MathSinImpl function literal below?

https://codereview.chromium.org/50563003/diff/80001/test/mjsunit/sin-cos.js
File test/mjsunit/sin-cos.js (right):

https://codereview.chromium.org/50563003/diff/80001/test/mjsunit/sin-cos.js#newcode65
test/mjsunit/sin-cos.js:65: print(e)
nit: debugging leftover

https://codereview.chromium.org/50563003/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to