Elizabeth Mattijsen <[EMAIL PROTECTED]> wrote:

> The main problem with Perl 5 ithreads is the thread startup CPU and
> memory usage.

I've now compiled a threaded perl5.8.0 and benchmarked prime-pthread
from perlthrtut against parrot:

$ time parrot t.imc >1

real    0m1.044s
user    0m0.730s
sys     0m0.290s

$ time ./t.pl>1

real    0m8.574s
user    0m8.070s
sys     0m0.480s

"t.imc" is F<examples/assembly/thr-primes.imc>, but producing primes up
to 1000 too. Parrot is built unoptimized and runs the slow
bounds-checking core. My system is i386/linux (2.2), Athlon 800, 256 Meg
RAM (ulimited to 200 Meg).

That's about 8 times faster (parrot doesn't copy all its state, but the
test program doesn't have much) but sill dog slow. Starting and joining
1000 threads in parrot takes about 5 secs on my system while doing 1000
pthread_create/pthread_join in C takes only ~ 0.1 sec.

Its of course far too early to do benchmarks, but interesting ...

> Liz

leo

Reply via email to