annotate TOOLS/perlbench.pl @ 15277:fed5d4ab5e5f

fix palette8tobgr32/palette8torgb32 on big endian
author nplourde
date Wed, 27 Apr 2005 18:17:53 +0000
parents 5cbbf47cae1e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
576
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
1 #!/usr/bin/perl -w
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
2 use strict;
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
3 use constant CMD => "./fastmem2-k7";
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
4
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
5 sub dobench {
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
6 my $i;
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
7 my ($runs, $sleep, $command) = @_;
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
8 for($i = 0; $i < $runs; $i++) {
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
9 sleep $sleep;
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
10 system $command;
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
11 }
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
12 }
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
13
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
14 print "Single run of sse bench with 1sec sleep:\n";
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
15 &dobench(1,1,CMD);
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
16 print "Sleeping 10seconds before starting next bench!\n";
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
17 sleep 10;
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
18 print "10 runs of sse bench with 0sec sleep:\n";
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
19 &dobench(10,0,CMD);
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
20 print "Sleeping 10seconds before starting next bench!\n";
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
21 sleep 10;
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
22 print "10 runs of sse bench with 1sec sleep:\n";
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
23 &dobench(10,1,CMD);
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
24 print "Sleeping 10seconds before starting next bench!\n";
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
25 sleep 10;
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
26 print "10 runs of sse bench with 2sec sleep:\n";
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
27 &dobench(10,2,CMD);
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
28 print "Sleeping 10seconds before starting next bench!\n";
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
29 sleep 10;
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
30 print "10 runs of sse bench with 3sec sleep:\n";
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
31 &dobench(10,3,CMD);
5cbbf47cae1e fastmemcpy benchmark by Felix Buenemann
arpi_esp
parents:
diff changeset
32 print "Bench finished!\n";