Re: core.bitop.bt not faster than & ?

2014-12-18 Thread Dicebot via Digitalmars-d-learn
Having quick read through the http://en.wikipedia.org/wiki/Word_%28computer_architecture%29 may help re-calibrating the way you thing about bit operations and optimization.

Re: core.bitop.bt not faster than & ?

2014-12-17 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Dec 17, 2014 at 04:08:40PM +, Trollgeir via Digitalmars-d-learn wrote: > On Wednesday, 17 December 2014 at 14:58:13 UTC, Adam D. Ruppe wrote: > >On Wednesday, 17 December 2014 at 14:12:16 UTC, Trollgeir wrote: > >>I'd expect the bt function to be up to 32 times faster as I thought > >>

Re: core.bitop.bt not faster than & ?

2014-12-17 Thread Trollgeir via Digitalmars-d-learn
On Wednesday, 17 December 2014 at 14:58:13 UTC, Adam D. Ruppe wrote: On Wednesday, 17 December 2014 at 14:12:16 UTC, Trollgeir wrote: I'd expect the bt function to be up to 32 times faster as I thought it only compared two bits, and not the entire length of bits in the uint. The processor doe

Re: core.bitop.bt not faster than & ?

2014-12-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 17 December 2014 at 14:12:16 UTC, Trollgeir wrote: I'd expect the bt function to be up to 32 times faster as I thought it only compared two bits, and not the entire length of bits in the uint. The processor doesn't work in terms of bits like that - it still needs to look at the