Debian Codegraph @

test/perf/macro.pl

raw
1 #!/usr/bin/perl
2 #
3 # Generate a test case for macro lookup performance
4 #
5
6 ($len) = @ARGV;
7 $len = 100000 unless ($len);
8
9 print "\tbits 32\n";
10 print "\tsection .data\n";
11 print "\n";
12
13 for ($i = 0; $i < $len; $i++) {
14 print "%define m$i $i\n";
15 for ($j = 0; $j < 8; $j++) {
16 print "\tdd m", int(rand($i+1)), "\n";
17 }
18 }