[RC5] newbie question

Elektron elektron_rc5 at yahoo.ca
Fri Aug 29 07:17:50 EDT 2003

> As far as I can see we may really easily optimise bits
> of information required for residual to be 32-bits
> per each block from given client and don't grow up
> as long as we combine blocks from the same client.

Combining blocks from different clients wouldn't work anyway, since 
someone somewhere has to keep track of who did which block. 4 bytes 
extra on the participant ID/email address isn't much.

> Writing to L1 cache and reading from it at least on P4M
> is 1 clock cycle each. Doing XORs is 1 cycle as well.
> (or was it even 0.5 cycle? I can't remember).

Things don't take half a cycle - rather, you can sometimes begin more 
than one instruction on the same clock cycle.

> Let's say we've got a 3-pipe loop - we need 2 memory
> accesses and 3 xors which is 5 cycles per 3 keys.
> This gives only 1 and 2/3 clock cycle per key.

The fastest I can come up with (results a,b,c, residual in *p, extra 
register r) is { r = *p; b ^= c; r ^= a; r ^= b; *p = r; } which takes 
four clock cycles, since you can do the first two at the same time.

It seems to take four clock cycles on a P133 anyway.

> Now... how many cycles does it take to decrypt one key?
> On P4 it's _very_ slow because of lack of barrel shifter
> so I should probably check on Celeron or P III.
> As far as I remember it was somewhere around 200
> clock cycles per key (somebody correct me if I'm wrong,
> I don't have any P III handy here).

1400000000/2941147 (the PIII 1400 in the cpu database) gives 476 cycles.

I'm not sure that the PIII has enough registers for a 3-pipe core 

> My assumtion of 2% slowdown in the project was taken
> from slowdown of clients and reissuing of the same blocks.

Reissuing blocks is no issue here.

> Does Hyper Threading support priorities?
> You know: in case two processes of different priorities
> running simultanously. They are executed simultanously,
> but aren't they equal when fighting for processor internals?

 From what I've heard on this list, the 'second' processor comes second. 
I don't think a processor which 'fought for internals' would run 

- Purr

More information about the rc5 mailing list