[go-nuts] Re: Bitwise operators applications

2017-07-23 Thread Stefan Nilsson
There is a whole bunch of interesting and efficient (both in practice and in theory) searching and sorting algorithms that rely on bitwise operations. Only a few weeks ago, I wrote a short text about ints and bitwise operations: https://github.com/yourbasic/int It covers radix sorting,

Re: [go-nuts] Re: Bitwise operators applications

2017-07-22 Thread Michael Jones
...and...because that is how computers work so the understanding will itself be interesting and useful. It can be nice to see how things work "under the hood." On Sat, Jul 22, 2017 at 9:40 PM, Egon wrote: > Generally when you ask that question you probably won't need to use

[go-nuts] Re: Bitwise operators applications

2017-07-22 Thread Egon
Generally when you ask that question you probably won't need to use them. The main reasons you would use them: 1. bitflags -- allows to easily specify a set of 8 to 64 elements easily (https://play.golang.org/p/DZj9FerK19) 2. fast ways to compute something -- see