Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Bit hacking

Re: Bit hacking

From: <postmaster_at_diffenbach.org>
Date: Mon, 17 Jul 2006 07:56:09 -0400

Fascinating stuff. Well worth reading.

But many of the tricks have notes indicating that they invoke
undefined behavior according to the C Standard, or that their
efficiency depends on the target system's assembly language

And in all cases, there's a more straightforward way to do these
things, a way that programmers following you won't have to puzzle out.

For all these reasons, I'd want to avoid these tricks in production
code unless there is a real need to conserve every cycle. and if
trimming cycles is so important, I'd want to do it only until it could
be replaced by assembly language versions for each target.



Bluechip wrote:
> Solves a lot of problems I have heard discussed in many places,
> including such as bit reversing - which I have heard discussed here
> ...may or may not be of interest to the bit gurus
>
> http://graphics.stanford.edu/~seander/bithacks.html
>
>
>
Received on 2006-07-17

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy