On Thu, Dec 07, 2000 at 07:07:27PM +0000, Simon Cozens wrote:
> On Thu, Dec 07, 2000 at 12:24:50PM +0000, David Mitchell wrote:
> > In a Perl context, I find it hard to believe that reference counting takes
> > up more than tiny fraction of total cycles.
>
> On a vaguely related note, here's the flat profile from gprof run
> cumulatively on the test suite. (I haven't seen some hard data like
> this in a while) Freeing SVs does appear to be inexpensive but called
> often. What the *hell* is wrong with modulo?
>
This isn't directed at Simon, who isn't making any claims about what
his data means. He just offered a convenient opening for me to pass
on some experience.
Relying on isolated measurements of Perl 5 to shape the implementation of
Perl6 is probably not going to be a good idea.
I've run a lot of gprof's on Perl5 and one of the things I found was
that the results varied widely from program to program. Any given
program had consistent results, but the hot spots in each program
were different.
Worse yet, the results varied widely when I changed compilers. Sun's C
compiler is reputedly a lot better than gcc, but when I tried both with
max optimization on perlbench and some other programs, some benchmarks
ran up to 15% faster with one compiler or the other, but the perlbench
average was identical. Various attempted micro-optimizations in the Perl
5 source were met with roughly identical results.
Then I tried checking some of my results on platforms other than Sparc,
Adding x86 and PowerPC made it even more confusing. I got about the
same 15% variation in random directions in more code.
Benchmarking complex programs on multiple platforms is hard. When
the complex program is a programming language itself, it's really
hard.
--
Ed Mooring ([EMAIL PROTECTED])