From: | Jasen Betts <jasen@xnet.co.nz> |
Newsgroups: | comp.compilers,comp.arch |
Date: | 9 Dec 2008 11:00:47 GMT |
Organization: | Dis (not Dat) Organisation |
References: | 08-12-014 08-12-048 |
Keywords: | architecture, OOP |
Posted-Date: | 10 Dec 2008 16:50:08 EST |
On 2008-12-08, Torben Cgidius Mogensen <torbenm@pc-003.diku.dk> wrote:
> "Tony" <tony@my.net> writes:
>
>> To me, it seems like "reducing everything to a function" may be a bit
>> dated given that OO languages are the thing nowadays. Can anyone
>> imagine any new potential assembly language instructions that would
>> make implemention of OO languages easier? (Not just necessarily the
>> function thing, but anything).
>
> Having a fast hash instruction might help: It would take two numbers
> as arguments and produce a single number that is a hash of the pair.
> It would not need to be cryptographically strong, just good enough for
> hash tables.
if that's the only criterion xor is as good as anything else.
otoh there are some MMX op-codes that could be abused for this purpose
and may give better results when used on strings.
> This can be used for associative arrays, dynamic method lookup for
> clone-based inheritance, etc.
associative memory may be more useful.
> A good hash can take many "normal" instructions, but you can make a
> good hash efficiently in hardware.
processors with strong hashes are available (Via Eden has AES in hardware)
good hashes (like CRC-32?) do lend themselves to very simple hardware
implementation (if you can do them in serial or byte-wise)
how fast does it need to be to be worth-while?
Return to the
comp.compilers page.
Search the
comp.compilers archives again.