On Fri, 1 Jun 2018, Richard Biener wrote:
> For code-generating adjacent inserts wouldn't it be more efficient
> to do
> 
>   accum = first-to-be-inserted-val;
>   accum <<= shift-to-next-inserted-val;
>   accum |= next-to-be-inserted-val;
> ...
>   accum <<= final-shift;
> 
> instead of shifting the to-be-inserted value?

Perhaps I'm missing some context, but I don't see why this is expected
to be more efficient. This sequence has both ors and shifts on the critical
path, whereas shifting to-be-inserted values has more parallelism (shifts
are then independent of ors), and even allows ors to be reassociated,
shortening the critical path even more.

Alexander

Reply via email to