Hacker News new | past | comments | ask | show | jobs | submit login

What do you mean by efficient and cheap? It doesn't fare well in https://benchmarksgame-team.pages.debian.net/benchmarksgame/... at least.



There’s something fishy about that report. It says it is presenting the fastest programs, but when I click through to “all perl programs”, there are faster (often by 1-2 orders of magnitude) programs / runs:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

For instance, the page you linked has “pidigits” at the top, and says node is faster, 2.58s vs 3.61.

2.58s is the slowest run of the fastest pidigits on the node page, but one of its runs took 1.04 seconds.

The perl page lists a 1.24 second run for “pidigits 2”.

The reported numbers in the language comparisons don’t seem to be averages.

All the pidigits programs list the same output, so presumably, they’re running with the same ‘N’.

Between the variance and inexplicable stats being applied to the results, I’m not sure what to conclude from these numbers.


> There’s something fishy about that report.

No, there really isn't.

> 2.58s is the slowest run of the fastest pidigits on the node page, but one of its runs took 1.04 seconds.

Notice column N — 2,000 6,000 10,000.

That's a command line argument passed to each program, controlling how many digits of pi are generated — the workload.

So, 2.58s for 10,000 digits and 1.04s for 6,000.

(And as it says, there can be a cold caches effect on the first measurements.)


Nodejs is very fast, because it uses an an engine that has had multiple millions of dollars thrown at it to make it fast. Most interpreted languages don't fare well against it.

Perl fares somewhat favorably against Python, Ruby and PHP though. Those are what I would consider equivalent languages to compare against to get a general idea of its speed.


>multiple millions of dollars

I can pretty much assure you the accumulated dollars invested over the years in making JS fast is likely to be closer to multiple billions combined.


You don't hear about it, but Perl has had many millions thrown at it too.


JS is probably closer to billions.


Not just orders of magnitude more money, but more importantly the large number of incredibly talented people working full time on JavaScript, in many different companies and research institutions, collaborating together. JavaScript benefits from an overwhelming network effect and critical mass of tools and developers, that Perl just can't touch, and never will.


Unfortunately it does not change bad parts.


Depends on what you mean by "fare well". Even in those benchmarks, Perl seems to have a lower memory footprint than Node.js in most of the results.

It's also worth noting that three of the examples (pidigits, reverse-complement, fasta) don't seem to do any multiprocessing in Perl whereas they do in Node.js. At least for reverse-complement and fasta, it should be possible to rewrite those to use multithreading (like the Node.js versions do).


> should be possible to rewrite those

Until someone does…




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: