On Tue, Aug 6, 2013 at 3:05 PM, <[email protected]> wrote:

> On 2013/08/06 12:56:17, Jakob wrote:
>
>> Unifying lithium codegen and the stub sounds reasonable. Maybe you can do
>> a
>> microbenchmark to figure out whether the branchless stub code or the
>>
> conditional
>
>> "neg" in lithium is faster in practice.
>>
>
If I understand things correctly, we are talking about bit twiddling hacks
like http://graphics.stanford.edu/~seander/bithacks.html#IntegerAbs here. A
microbenchmark is totally useless, because it doesn't show the higher
register pressure due to the additional register needed.


> Actually I did an experiment before. The branchless stub code was faster
> than
> the conditional "neg". One of my previous idea is to port branchless code
> to
> lithium. The issue is that LMathAbs only has one available register. To
> use the
> branchless code, you need to change the LMathAbs  instruction to assign a
> temporary register.


I am not really convinced that trading a branch for an additional register
is the right thing to do, my gut feeling is quite the opposite: Better use
a branch than wasting a register.

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