On 2013/04/11 10:38:30, Zheng Liu wrote:
On 2013/04/09 16:27:52, Yang wrote:
> On 2013/04/02 06:44:21, Zheng Liu wrote:
> > X64 already had it because I accidentally included it in a previous
code
> review
> > http://code.google.com/p/v8/source/detail?r=13289
> > (oops, sorry!)
> >
> > This change is that for some processor, sequence like:
> > divsd XMM0, xmm?
> > (movaps XMM0, XMM0)
> > mulsd xmm? ,XMM0
> >
> > Will prevent div and mul execute in parallel even if they are
indepedent
(e.g.
> > belong to two loop iterations)
> > Adding [*anymov* XMM0, XMM0] can workaround it.
> >
> > I tested it on Nehalem/Westmere (e.g. i7-9**/8**, Xeon X56**)
> > Not sure about newer processors.
> >
> >
> > Case to reproduce:
> > ~12% faster on affected processors
> >
> > var darr1 = new Float64Array([0.5, 0.5]);
> > var darr2 = new Float64Array([0.5, 0.5]);
> >
> > function fn1(a, b, n) {
> > var c;
> > for (var i = 0; i < n; i++)
> > c = b[i&1] * (1 / a[i&1]);
> > }
> >
> > fn1(darr1, darr2, 10);
> > fn1(darr1, darr2, 10);
> > %OptimizeFunctionOnNextCall(fn1);
> > var start = Date.now();
> > fn1(darr1, darr2, 1000*1000*100);
> > print(Date.now() - start);
>
> Sorry that it took this long.
>
> Could you add a comment to the inserted instruction (also on x64) so
that it
> makes some sense when somebody looks at the code later on and won't
accidentally
> remove it?
Comments addressed.
Please take another look.
LGTM.
https://codereview.chromium.org/13447003/
--
--
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.