On 2013/09/09 19:08:22, Jakob wrote:
This does not lgtm. It is very unintuitive why Double vs. Int32 representation
would have anything to do with whether operands are better swapped or not.
Probably this benchmark just happens to create a situation where our heuristic
makes the wrong decision. Maybe Better{Left,Right}Operand() should be made
smarter? Changing behavior based on representation does not seem right.

Yes, after revisit the issue, I also find that simply removing this feature for
double value is not correct.
It would be better to make Better{Left,Right}Operand()smarter. And it is also possible that the benchmark I used seems to be just a corner case which enlarges
the negative impact of xmm register move. WIP....

I paste the benchmark here in case you can't access it.


function test_add(x, y) {
  var z = 0;
  for (var i = 0; i < x; i++)
    z += y;
}

test_add(0x3ffffff, 10.5);

function test_mul(x, y) {
  var z = 10;
  for (var i = 0; i < x; i++)
    z = z * y;
}

test_mul(0x3ffffff, 10.5);





https://codereview.chromium.org/23717039/

--
--
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