Comment #11 on issue 2513 by [email protected]: life benchmark slowness
http://code.google.com/p/v8/issues/detail?id=2513
Ok, I'm investigating changing how we emit booleans. I compared three
options on the life benchmark, (a) normal boolean, (b) boolean?1:0 and (c)
boolean|0 (I understand from what you said before that boolean|0 will be
slow in v8 too, but I was just curious about other JS engines). Here are,
for each browser, which of a-c it does best on, then less good on:
Chrome b, a, c
Firefox a|c, b
IE10 b, a, c
Safari a, c, b
So c seems pointless, not surprising I guess, it's slow in Chrome and IE
and only fast in Firefox, where there is another option that is equally
fast anyhow. That leaves a and b, and there's no clear answer: each is
fastest in two browsers. So there is no simple choice here.
I'll continue to investigate this, these numbers were calculated with the
naive approach of switching all booleans to a new format. It is possible
that a smarter method could give better results and maybe find a middle
ground here. One option is for us to detect which booleans end up being
used at least once in a bitwise operator or some similar heuristic
(although this may require a lot of work in the emscripten optimizer),
another is at the LLVM IR level to only modify zext (zero extend) of i1 to
a value with more bits to emit ?1:0.
--
--
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.