Lightweight CPU Benchmark


Probably full of holes. Tested on unloaded systems running Fedora Core Linux.

results

    42.2s : Pentium w/MMX 200mhz
    19.5s : Pentium II 375mhz
    13.2s : Pentium III 550mhz

code

    #!/usr/bin/perl -w

    my $n    = 0;
    my $m    = 0;
    my $nmax = 10000000;

    while(1) {
      $m += ($n++);
      $m -= ($n++);
      $m *= ($n++);
      $m /= ($n++);
      last if ($n >= $nmax);
    }

    exit;


source: source
keywords: keywords
date: 01/27/2005