Re: Parallel search in Perl and other languages



On 2008-07-28 16:43, smallpond <smallpond@xxxxxxxx> wrote:
Peter J. Holzer wrote:
[WideFinder]
Other people contributed equivalent programs in other languages, so
he now has a nice collection of one or two dozen implementations of
the same task in different languages. Last time I looked, the Perl
implementation was the fastest.


Hard to imagine perl winning for execution speed on any task.

Give the programmer a deadline (like "I need that by tomorrow") and perl
is frequently faster than some nominally faster programming language,
because the perl programmer needs to spend less time with "housekeeping"
and can spend more time finding a better algorithm.

In the case of searching and matching (what WideFinder does), the main
factor for performance is the speed of the RegEx engine (and perl's is
apparently quite fast for many cases).


The benchmarks game site
[...]
http://shootout.alioth.debian.org/gp4/index.php
[...]

These are a lot of fun but not very relevant for the real world. Almost
all of the benchmarks focus on specific operations, not on doing a task.


has a couple of multi-thread tests where perl does much worse than
most other languages.

If you think you need to use threads in Perl, think again :-).

Those results aren't totally optimized. perl results are not
using pp,

How would pp make perl faster? It's not a compiler, just a packager.

hp
.



Relevant Pages

  • Re: Why C Is Not My Favourite Programming Language
    ... That better describes Perl. ... safe code... ... > languages, allthough C has more conzepts to write such code than other ... is rare that a programmer gets a completely free hand (often the choice ...
    (comp.lang.c)
  • Re: Learning perl - for experienced programmers
    ... crappy code comes from a crappy programmer, ... I have used both languages side by side for some time, ... example how Perl is bad at OO. ... I'm not a programmer, but I have three ...
    (comp.lang.perl.misc)
  • Re: Quick question about using a table of text input fields within a javascrip function
    ... as he quotes the charter correctly (as I ... While not everyone interested in ECMAScript will know perl, ... other related languages (presumably any language used for CGI ... the only language I use for CGI programming. ...
    (comp.lang.javascript)
  • Re: syntax extension, was Why context-free?
    ... >of a different character - Knuth himself gives several examples in The ... Perl has its sweet spot domains (as a child of sed, ... with every branch tested both for correctness of the ... That someone who is a skilled programmer in some languages ...
    (comp.compilers)
  • Re: syntax extension, was Why context-free?
    ... because TeX doesn't have a precise description (merely a guide on ... Perl has its sweet spot domains (as a child of sed, ... with every branch tested both for correctness of the ... But there are plenty of wonderful languages ...
    (comp.compilers)