attractivechaos / plb

Programming language benchmarks
http://attractivechaos.github.com/plb/
272 stars 57 forks source link

Simplified pattern matcher. #10

Closed chromatic closed 13 years ago

chromatic commented 13 years ago

This simplification of the Perl program should improve its speed.

attractivechaos commented 13 years ago

Trimming the tailing "\n" is intentional; otherwise the result will be difference. Other implementations have a similar treatment. Anyway, trimming is much faster than regex matching.