1# Copyright (C) 2001-2006, Parrot Foundation. 2 3=head1 NAME 4 5examples/benchmarks/stress2.pasm - Brief 6 7=head1 SYNOPSIS 8 9 % time ./parrot examples/benchmarks/stress2.pasm 10 11=head1 DESCRIPTION 12 13Creates 200 arrays of 10000 elements each. 14 15=cut 16 17.pcc_sub :main main: 18 19 set I3, 20 20 new P10, 'ResizableIntegerArray' 21ol: 22 set I0, 10 23 new P0, 'ResizablePMCArray' 24 25ol1: 26 local_branch P10, buildarray 27 set P0[I0], P1 28 dec I0 29 if I0, ol1 30 31 dec I3 32 if I3, ol 33 34 end 35 36buildarray: 37 set I1, 10000 38 new P1, 'ResizablePMCArray' 39loop1: 40 new P2, 'Integer' 41 set P2, I1 42 set P1[I1], P2 43 dec I1 44 if I1, loop1 45 local_return P10 46 47=head1 SEE ALSO 48 49F<examples/benchmarks/stress.pasm>, 50F<examples/benchmarks/stress.pl>, 51F<examples/benchmarks/stress1.pasm>, 52F<examples/benchmarks/stress1.pl>, 53F<examples/benchmarks/stress2.pl>, 54F<examples/benchmarks/stress3.pasm>. 55 56=cut 57 58# Local Variables: 59# mode: pir 60# fill-column: 100 61# End: 62# vim: expandtab shiftwidth=4 ft=pir: 63