gambas-source-code/benchmark/string.pl
gambas 23be942b6a Work continues on the new JIT system.
[BENCHMARKS]
* NEW: Little meaningless changes.

[INTERPRETER]
* NEW: JIT: Support for FOR EACH loops.
* BUG: JIT: Handle function values that are put on stack before calling them.

[COMPILER]
* NEW: JIT: Optimization of mathematic functions.
* NEW: JIT: Support for FOR EACH loops.
* NEW: JIT: Remove successive POP_x() / PUSH_x().
* NEW: JIT: Optimization of DIV and MOD.
* NEW: JIT: Support of internal control local variables used by SELECT and FOR EACH.
* NEW: JIT: Support for SWAP.

[GB.JIT]
* NEW: Optimization of mathematic functions.
* NEW: Variants management.
* NEW: All conversions are handled now.
* NEW: FOR EACH loops are implemented.
2018-06-05 11:43:39 +02:00

18 lines
439 B
Perl
Executable file

#!/usr/bin/perl -w
my $str='abcdefgh'.'efghefgh';
my $imax = 1024 / length($str) * 512;
my $starttime=time();
my $gstr='';
my $i=0;
while($i++ < $imax+1000)
{
$gstr.=$str;
$gstr=~s/efgh/____/g;
my $lngth=length($gstr); ## my $lngth=length($gstr); # Perhaps that would be a slower way
print time()-$starttime,"sec\t\t",$lngth/1024,"kb\n" unless $lngth % (1024*64); #print out every 256kb
}