[go-nuts] Re: bit twiddling API survey

2017-01-11 Thread Damian Gryski


On Wednesday, January 11, 2017 at 12:38:35 AM UTC+1, not...@google.com 
wrote:
>
> Are bit rotations complied to single instructions?  Specifically things 
> like:
>
> var a uint32
> (a << 5) | (a >> (32 - 5)
>

They will be (with 1.9) for constant rotate values: 
https://github.com/golang/go/issues/18254

Damian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: bit twiddling API survey

2017-01-10 Thread notcarl via golang-nuts
Are bit rotations complied to single instructions?  Specifically things 
like:

var a uint32
(a << 5) | (a >> (32 - 5)



On Monday, January 9, 2017 at 3:46:45 PM UTC-8, mo...@google.com wrote:
>
> Hello!
>
> I'm working on a proposal for a compiler/hardware supported bittwidling 
> API. See discussion at https://github.com/golang/go/issues/17373. The 
> current set of functions I have in mind are: count trailing zeros, count 
> leading zeros, byte swap and population count for 32 and 64 bits integers. 
> Which other functions do you thing should be in this API? What are the 
> popular packages that implement (even without exporting) a subset of these 
> functions?
>
> Regards,
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: bit twiddling API survey

2017-01-10 Thread Scott Pakin
On Monday, January 9, 2017 at 6:07:19 PM UTC-7, ma...@influxdb.com wrote:
>
> I haven't personally experienced a need for a bit twiddling API, but if 
> you're looking for other interesting operations, you might want to check 
> out the awesome-bits curated list of bitwise operations [1].
>
> [1] https://github.com/keonkim/awesome-bits
>

Sean Eron Anderson's Bit Twiddling Hacks 
 is another good 
reference source.

— Scott

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: bit twiddling API survey

2017-01-09 Thread mark
I haven't personally experienced a need for a bit twiddling API, but if 
you're looking for other interesting operations, you might want to check 
out the awesome-bits curated list of bitwise operations [1].

[1] https://github.com/keonkim/awesome-bits

On Monday, January 9, 2017 at 3:46:45 PM UTC-8, mo...@google.com wrote:
>
> Hello!
>
> I'm working on a proposal for a compiler/hardware supported bittwidling 
> API. See discussion at https://github.com/golang/go/issues/17373. The 
> current set of functions I have in mind are: count trailing zeros, count 
> leading zeros, byte swap and population count for 32 and 64 bits integers. 
> Which other functions do you thing should be in this API? What are the 
> popular packages that implement (even without exporting) a subset of these 
> functions?
>
> Regards,
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.