0

I've just set up my new PC, and I want to compare CPU speed to my MacBook Air using some simple program. I've already used Python timeit module, but I wonder, what function will produce more representative result for the problem. (some simple arithmetic stuff, or some linear algebra operations, etc.)

For example:

python -m timeit '"-".join([str(n) for n in range(100)])'

gives a result of 25.7 msec per loop on MBA and 12 msec per loop on PC.

greenwolf
  • 214
  • 1
  • 7
  • to clarify, I want to find some good computational function (or set of them) to compare times, not time-measurment function itself. – greenwolf Feb 18 '16 at 18:10
  • You don't want to write a benchmark on your own. For meaningful results it would need to closely resemble actual everyday workload or provide scenarios for specific tasks (e.g compilation). That being said, there are already many many benchmarks out there: https://www.google.com/#q=cpu+benchmark – Sebastian Hoffmann Feb 18 '16 at 18:36

0 Answers0