Joshua Gatcomb wrote:
I know these benchmarks have their value, but I am more interested in
real practical code that I have previously written to solve a problem.
I know that the Rakudo code will be slower than the perl 5.

The point of the benchmark is not "oh look, it's slower than Perl 5". The benchmarks are good for testing a specific aspect of the language, so it is easier to isolate *where* the problem is. This is harder on a real application.

Benchmarks help you see where the biggest gains are to be found. Additionally, they help measure improvement. When Patrick fixed the bug with the ++ operator, the K-Nucleotide benchmark went from being the slowest (2000x slower than P5) to being the fastest (200x slower).


In fact,
I would expect it to be slower by a consistent factor unless there is
some aspect of that program with a major optimization flaw.

And your expectation would be wrong. In the real world some things are faster than others. Remember the 80/20 rule. Benchmarks help you locate the 20% of the code that needs the most attention.

As of this moment I have four benchmarks written, and each benchmark gives wildly different factors.


I am interested in a tool that can benchmark both perl 5 and perl 6
natively.

If you write such a tool, I'd like to try it.

Daniel.

Reply via email to