Re: More LTC timings...

From: Brian Gladman (
Date: 06/17/03

Date: Tue, 17 Jun 2003 19:34:45 +0100

"Mok-Kong Shen" <> wrote in message
> Brian Gladman wrote:
> >
> > "Tom St Denis" <> wrote:
> .......
> [snip]
> > That is doubtful. My results 3 years ago for Twofish in C as described
> > here:
> >
> >
> >
> > give 370 cycles per block and 8500 cycles for key setup.
> I have a question of ignorance: I remember to have read
> a book on assembler, in which it is listed for each
> instruction the number of cycles for diverse types of
> chips, i.e. the same instruction may have different
> cycles on different machines. Now, if one measures
> the total time of a program on a machine and deduce
> from the MHz of the hardware the total number of cycles
> involved, would that figure remain the same on a
> machine having a different type of chip? (The Intel
> family has a number of members.) Or is the above
> stemming from a sheer misunderstanding (or wrong
> memory) of mine? Thanks.

The number of cycles for an algorithm used to be a fairly good measure of
the performance of source code but it is getting much less reliable now and
is becoming more a test of how good compiler writers (actually back end
writers) are at understanding and exploiting modern machines which have very
sophisticated mechanisms for speeding up code execution.

Moreover, different machines in the same family are often radically
different in terms of performance. For example an MMX version of AES on the
P3 runs in 270 cycles but on the P4 is takes 420 cycles. And Tom's figures
show that Athlons and P4's give very different results.

     Brian Gladman

Relevant Pages

  • Re: Machining Tips From John at Stellar Machine Inc.
    ... Lots of non-CNC machines run automatic cycles being hand feed. ... Not all VMC's, HMC's, CNC Mills, Vertical Mills, Horizontal Mills, CNC ...
  • Re: More LTC timings...
    ... >> cycles on different machines. ... > is becoming more a test of how good compiler writers (actually back end ... For example an MMX version of AES on the ...
  • Re: Keeping a 4th axis on a fadal table...
    ... Mazaks, we ... see a few million cycles between screw changes, ... Rough boring machines, we see about a million, but we know the ...
  • Re: Benchmark for Ruby
    ... tuning compiler options. ... One may need a cluster of machines to do this ... always talking about how machine cycles are cheaper than programmer ... and would not be for a ruby build. ...
  • Re: OT:and long. regards evoting 14th amendment and my hubris
    ... machines with these idiotic electronic ones and the companies are buying the ... stolen...already lost election. ... at this point some very accomplished computer programmers have found ... the first step is writing the "human language" source code. ...