>>>>> "S" == S Michael Convey <smcon...@gmail.com> writes:

S> I've tested perl programs before, same program ran through an interpreter,
S> and then same program ran as compiled machine code. And the compiled version
S> wasn't just 2 times faster, it was WAY faster...but I can't remember by what
S> factor.

You were probably comparing apples and oranges though.

The Perl statement "$x = $y * $z" does a *lot* more work than the C statement
"x = y * z", because a Perl scalar is a lot fancier than a C variable.

If you had compared Perl's PDL libs against your C program (where you can
actually use native data types instead of Perl's fancy data types), I think
you'd find it to be far closer, perhaps within a factor of two again.

But I'm tired of trying to fight the ignorance around this.  It's about
how much your language is doing for you, not whether it's "interpreted"
or "compiled".

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

_______________________________________________
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to