3 # Generate a test case for token lookup performance
6 @insns = qw(add sub adc sbb and or xor mov);
7 @regs = qw(eax ebx ecx edx esp ebp esi edi);
11 return $_[int(rand(scalar @_))];
15 $len = 1000000 unless ($len);
20 for ($i = 0; $i < $len; $i++) {
21 print "\t", pickone
(@insns), " ",
22 pickone
(@regs), ",", pickone
(@regs), "\n";