You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Paul Elschot <pa...@gmail.com> on 2014/11/06 17:18:14 UTC
Processor support for select operations?
Dear all,
For LUCENE-6040 it would be good to have better processor support for
selecting the i-th set bit from a 64-bit integer.
Not too long ago Long.bitCount() was intrinsified in JVM's.
I hope something similar will happen to a select(long x, int i)
method. However, better processor support is needed first.
This is somewhat off topic here, but does anyone know how to request
better processor support for select operations?
Regards,
Paul Elschot
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Processor support for select operations?
Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
And here's a very recent (still active, in fact) thread on how to add
a new intrinsic instruction to hotspot :)
http://markmail.org/message/xosi5azzc3hknab7
D.
On Fri, Nov 7, 2014 at 8:46 AM, Dawid Weiss
<da...@cs.put.poznan.pl> wrote:
> And there's always hacker's delight if you're sure popcnt is efficient:
>
> ctz(x) = pop((x & (−x)) − 1)
> ffs(x) = pop(x ^ (~(−x)))
>
> D.
>
> On Fri, Nov 7, 2014 at 8:41 AM, Dawid Weiss
> <da...@cs.put.poznan.pl> wrote:
>> Hi Paul,
>>
>> I think compiler-dev hotspot list would be adequate. Coincidentally,
>> John Rose mentioned ffs (find first bit set) ops just recently and
>> gave an interesting link to all sorts of implementations:
>>
>> http://markmail.org/message/siucbahtw2jzblzl
>>
>> Dawid
>>
>> On Thu, Nov 6, 2014 at 5:18 PM, Paul Elschot <pa...@gmail.com> wrote:
>>> Dear all,
>>>
>>> For LUCENE-6040 it would be good to have better processor support for
>>> selecting the i-th set bit from a 64-bit integer.
>>>
>>> Not too long ago Long.bitCount() was intrinsified in JVM's.
>>>
>>> I hope something similar will happen to a select(long x, int i)
>>> method. However, better processor support is needed first.
>>>
>>> This is somewhat off topic here, but does anyone know how to request
>>> better processor support for select operations?
>>>
>>>
>>> Regards,
>>> Paul Elschot
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: dev-help@lucene.apache.org
>>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Processor support for select operations?
Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
And there's always hacker's delight if you're sure popcnt is efficient:
ctz(x) = pop((x & (−x)) − 1)
ffs(x) = pop(x ^ (~(−x)))
D.
On Fri, Nov 7, 2014 at 8:41 AM, Dawid Weiss
<da...@cs.put.poznan.pl> wrote:
> Hi Paul,
>
> I think compiler-dev hotspot list would be adequate. Coincidentally,
> John Rose mentioned ffs (find first bit set) ops just recently and
> gave an interesting link to all sorts of implementations:
>
> http://markmail.org/message/siucbahtw2jzblzl
>
> Dawid
>
> On Thu, Nov 6, 2014 at 5:18 PM, Paul Elschot <pa...@gmail.com> wrote:
>> Dear all,
>>
>> For LUCENE-6040 it would be good to have better processor support for
>> selecting the i-th set bit from a 64-bit integer.
>>
>> Not too long ago Long.bitCount() was intrinsified in JVM's.
>>
>> I hope something similar will happen to a select(long x, int i)
>> method. However, better processor support is needed first.
>>
>> This is somewhat off topic here, but does anyone know how to request
>> better processor support for select operations?
>>
>>
>> Regards,
>> Paul Elschot
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Processor support for select operations?
Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
Hi Paul,
I think compiler-dev hotspot list would be adequate. Coincidentally,
John Rose mentioned ffs (find first bit set) ops just recently and
gave an interesting link to all sorts of implementations:
http://markmail.org/message/siucbahtw2jzblzl
Dawid
On Thu, Nov 6, 2014 at 5:18 PM, Paul Elschot <pa...@gmail.com> wrote:
> Dear all,
>
> For LUCENE-6040 it would be good to have better processor support for
> selecting the i-th set bit from a 64-bit integer.
>
> Not too long ago Long.bitCount() was intrinsified in JVM's.
>
> I hope something similar will happen to a select(long x, int i)
> method. However, better processor support is needed first.
>
> This is somewhat off topic here, but does anyone know how to request
> better processor support for select operations?
>
>
> Regards,
> Paul Elschot
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org