6 my $code1 = $ARGV[0] or die;
7 my $code2 = $ARGV[1] or die;
9 my $tmp = "/tmp/memcpy.txt";
11 print "speed comparison - $code1 vs $code2\n";
12 print "CC=$ENV{CC} OPTS=$ENV{OPTS}\n";
14 system("./build.sh $code1 && ./test > $tmp.1") and die;
15 system("./build.sh $code2 && ./test > $tmp.2") and die;
17 my @file1 = read_file
("$tmp.1") or die;
18 my @file2 = read_file
("$tmp.2") or die;
22 my @a = split /\t/, $x;
28 my ($size, $val) = getvals
($_);
29 my $s = shift(@file2);
30 my ($size2, $val2) = getvals
($s);
31 exit 1 if($size != $size2);
34 print "size: $size\t$val\t$val2\n";