Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Speeds vs functionality

by Jim (Curate)
on Jul 30, 2014 at 06:58 UTC ( #1095555=note: print w/replies, xml ) Need Help??


in reply to Re: Speeds vs functionality
in thread Speeds vs functionality

How much speed are you willing to sacrifice for a new feature?

As much as it takes, ícause I need the damn feature! ☺

IMHO, a modern CSV parser must be able to parse Unicode text encoded in any Unicode character encoding scheme and with any arbitrary Unicode characters (code points, or even <gulp> extended grapheme clusters) used for CSV metacharacters. And it must properly handle the Unicode byte order mark as prescribed by the Unicode Standard.

I'm the monk responsible for these related posts and threads:

In the case of the Concordance DAT file, the sep_char separator character, U+0014, is encoded in one byte in UTF-8:  "\x14". It's the quote_char quote character (and consequently also the escape_char quote escape character), U+00FE, that happens to be encoded in two bytes in UTF-8:  "\xC3\xBE".

Jim

Replies are listed 'Best First'.
Re^3: Speeds vs functionality
by Tux (Abbot) on Jul 30, 2014 at 12:13 UTC

    If I am satisfied with sep, quote_char and maybe even escape_char will be the next to deal with.

    Even with the rewrite as suggested by salva (more or less) I still see a slowdown of close to 10%.


    Enjoy, Have FUN! H.Merijn
      How are your benchmarking the code? I would like to try some ideas myself.
        $ perl -Iblib/lib -Iblib/arch examples/speed.pl 5

        Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1095555]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2020-09-28 22:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (144 votes). Check out past polls.

    Notices?