Re: fast bit rotation

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message ----- 
From: "jiri babor" <jbabor at paradise.net.nz>
To: <EUforum at topica.com>
Subject: Re: fast bit rotation


> 
> 
> Thanks, guys, for your tremendous response. Tommy's machine code looks most
> promising. Currently I am looking at 24 bit integers, later I might even be
> forced beyond the Euphoria's 31-bit limit. So, sorry, look up tables and
> similar 8-bit solutions are interesting, but not of much practical use.

Doesn't the INTEGER type only support 30-bit integers? I make the range for
INTEGER types to be from (-power(2,30)) to (power(2,30) - 1). It seems that
Euphoria uses 30-bits to hold the value, one bit to hold the sign and the 32nd
bit to hold the flag to tell if its an integer or something else? Just guessing.

> And thank you, Robert, for your explanation. I still think any
> self-respecting language should have fast shifts and rotations built into
> it.

Why is this Jiri? I would have thought that they are only a few programming
problems where bit shifting/rotating is of much use. Low-level device
interfacing, cryptography, image/audio manipulating, low-RAM environments (8-bit
embedded systems), ... What are you working on that needs it?

-- 
Derek

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu