Brent 'Dax' Royal-Gordon wrote:
Most reasonably mature languages are fast enough that
the performance
bottlenecks are usually in user code.
What a horrible generalisation. Most reasonably mature languages have
shocking tight loop performance. Tight loops are required for the
parsing of wikitext.
Here's the minimalistic example. This C++ code:
int main() {for (unsigned i=0; i<(unsigned)1e9; i++);}
executes in 1.58 seconds on my desktop computer. It was compiled with
g++ -O3. The equivalent PHP code:
<?php for ($i=0; $i<1e7; $i++); ?>
...took 6.3 seconds, or 400 times slower than C++ on this task. Perl is
173 times slower. For old times' sake I ran this:
FOR i& = 1 TO 1E+08
NEXT
... on QuickBASIC in safe mode in a DOS box. It took 8.5 seconds, a mere
54 times slower than 32-bit C++. So don't tell me interpreted languages
are getting faster, they're as slow as the day they were invented. If
you need to execute large numbers of calls to short-running functions,
you're sunk.
-- Tim Starling (considering rewriting parser in QuickBASIC)