View mode: basic / threaded / horizontal-split · Log in · Help
November 22, 2005
Access to the CPU rotate instruction
Whilst I'm thinking native CPU instructions, another very nice to have that has
been missing from every high level language I know... access to the CPU's built
in rotate. At present, as I'm sure most know, various checksums which run like
lightening in hardware are very time consuming in software and often depend on
non-obvious looking code in order to get the speed up.

Here's an old thread on the subject of rotate (from 2002):
http://www.digitalmars.com/d/archives/7593.html

In it we have:

Mon, 19 Aug 2002 10:43:39 -0700 "Walter" <walter xx digitalmars.com>  writes:

"Mac Reiter" <Mac_member xx pathlink.com> wrote in message
news:ajr3c5$140n$1 xx digitaldaemon.com...
> I was wondering if anyone else thought a rotate operator would be worth
the
> effort of adding to D. You don't need them very often, usually only for
> hashing, random number generation, encryption, or similar things, but
generally
> when you do need them you need to be able to do them very quickly.

I agree. I intend to add them in as "intrinsic" functions, not as an
operator.

Yay! =) Here's my plea: is it possible to add this at some point in the not
*too* distant future? Meantime - thankyou soooo much for including the bit
finding operations. I figured somebody would do a language with rotate in sooner
or later, but I never dreamt I'd find a language with CPU native bit finding.
Yipeee =)

Thanks in advance

Munch (very happy)
Top | Discussion index | About this forum | D home