Python quesiton

Ben Pfaff pfaffben@msu.edu
04 Feb 2001 18:39:46 -0500


[topic: speed of an interpreter primitive implemented in C
(regexps) versus an equivalent function implemented as Python
code.]

This is a very interesting topic in general.  One can pretty
easily find examples, in interpreted languages, where something
rather large and "heavy-weight" that is highly optimized in the
interpreter, outperforms equivalent code that implements it in
terms of multiple language primitives.  But, on the other hand,
especially in the case of languages like Java that are frequently
executed by very smart interpreters/compilers, this is not always
the case.  The only way to really tell is to benchmark it, but
the benchmark results won't necessarily be the same for the next
language implementation or hardware architecture that you try it
on.
-- 
"If a person keeps faithfully busy each hour of the working day, he
 can count on waking up some morning to find himself one of the
 competent ones of his generation."
--William James