George's Buffers and bits

From: Chris Jacobson (
Date: 03/01/99

I was reviewing George's Buffer code (I run a mix of 1.9 and 2.0 and my
own mods), and realized the magnitude/bitcounting/rounding code was a bit
... superfluous.

George, did you compare the current code for finding the next largest
power of 2, to the simple loop:

for (i = 0; i < 32; i++)
     if ((1 << i) >= size)

Normally I would presume you did, but the current code seems like such
overkill that I am left to wonder if someone had spiked your coffee that
day <g>, if you were just feeling creative, if your routines had other
purposes that have yet to reach the light of day in Pre-2.0 code, or if
they are actually faster.

- Chris Jacobson

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST