Re: Test cpu speed
- From: Peter Boettcher <boettcher@xxxxxxxxxx>
- Date: Mon, 24 Sep 2007 12:29:19 -0400
"Luca >0.0<" <luca@xxxxxxxxxxxxxx> writes:
You will NEVER be able to answer the question "which core is absoluteYes I know and you're right.
best". You can only answer the question "which is core is best for a
certain application". If you know what sort of processing you will be
doing, test that. Even there, if you produce an inefficient
implementation, CPU #1 might perform better than #2, even though a
better program might perform better on #2.
I want only a 'mean' eval, just to have some maxima indications of general
performance..
I've tried to write something like this:
-operation1 (count from 1 to 10e7)
-eval time1
-operation2 (multiply two random (100x100) matrices)
-eval time2
-operation3 (resolve VdPole Ode with 5000 points)
-eval time3
-total_time=time1+time2+time3
-total_average_time=(total_time) /3
Is it so ridicolous for a very approximate test?
I would not call it ridiculous. But I would also say that it will not
measure much that is useful.
Certainly if you run this benchmark on two CPUs with exactly the same
archictecture, just different clock speeds, then the faster clocked
CPU will run these faster. But you don't need a benchmark for that
anyway.
Can you extrapolate the 100x100 multiply to a 1000x1000 multiply, or
larger? No. The memory bandwidth will start to dominate, and you're
not measuring that.
Can you extrapolate the counting test to other, more complex, loops?
Not really. The MATLAB optimizer makes this stuff very complex. A
larger loop results in more instructions to be loaded from memory,
possibly exceeding the instruction cache. As the loop contents
change, you might shift from a fully optimized MATLAB loop to one that
includes function calls.
What you are describing is a research topic all on its own. It is
possible to build good benchmarks for certain classes of operations,
but to be good, you need to validate the benchmark against the
performance of an actual program.
Unless you are interested in researching and studying computer
architectures, stick with "bench" or some synthetic benchmark
published on the web, or run a piece of code which is very similar to
the program you know you want to run. Understand I'm not trying to
discourage you from trying this stuff. You asked for comments, so
I'll give you comments ;)
-Peter
.
- Follow-Ups:
- Re: Test cpu speed
- From: Steve Amphlett
- Re: Test cpu speed
- References:
- Test cpu speed
- From: Luca Cru
- Re: Test cpu speed
- From: Peter Boettcher
- Re: Test cpu speed
- From: Luca >0.0<
- Test cpu speed
- Prev by Date: Re: large slow for loop
- Next by Date: Re: extraction of rows from matrix
- Previous by thread: Re: Test cpu speed
- Next by thread: Re: Test cpu speed
- Index(es):
Relevant Pages
|