bit swap in byte

Author Message
Regular Member

Joined: 08/06/2022
Location: Austria
Posts: 67
Posted: 10:22am 26 Jul 2022      

well, i've timed the average runtime for 25600 runs (378MHz CPU):

- fun solution: 0.0618 mSec
- faster fun solution: 0.0584 mSec
- my old solution: 0.3368 mSec
a factor of almost 6 times faster, impressive.

btw, i'm still havin a lot of "fun" figuring out how the fun solutions work. So far, i can see the results of the individual steps, but i do not understand the underlying principle/math. Can matherp please explain that a bit ....

ad CSUB: have not tried csub at all until now, must read myself into that topic first.

thanks so far to all contributors, have now 2 more solutions and 2 more new myracles :-)