Perl5
0.016 Text::CSV::Easy_XS
0.016 Text::CSV::Easy_PP
0.033 Text::CSV_XS using bind_columns ()
0.037 Text::CSV_XS
0.504 Text::CSV_PP (Text::CSV)
1.295 Pegex::CSV
Perl6
17.474 Inline::Perl5 + Text::CSV_XS line-based
17.057 Inline::Perl5 + Text::CSV_XS IO-based
18.182 Inline::Perl5 + Text::CSV_PP (perl5's Text::CSV)
13.577 Text::CSV (perl6's Text::CSV)
49.948 CSV::Parser
There are plans to work on optimizing NativeCall soonish, so all timings using Inline::Perl5 might speed up because of that.
The timings for Text::CSV::Easy_?? are timing the use of a module that only parses 100% valid CSV. It offers no options to deal with abnormalities.
Given these numbers, we (the perl6 community) still need an overall performance gain of a factor 27 (13.6 → 0.5) to be able to say that pure-perl modules in perl6 are as fast as comparable pure-perl modules in perl5.
Personally I don't envision perl6 becoming as fast as perl5 with dedicated XS code, as Text::CSV_XS, at least not in the foreseeable future.
Enjoy, Have FUN! H.Merijn
|