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.
I've been doing some benchmarking the bt function
(http://dlang.org/phobos/core_bitop.html) up against a regular
bit -operator, and I'm a bit confused over the timings.
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
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
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
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
it only