Sent from my LG phone

Jim Gibson <jimsgib...@gmail.com> wrote:

>
>On May 26, 2012, at 5:51 AM, pa...@fsmail.net wrote:
>
>> split is slower than the correct regex matching.
>> 
>
>Did you know that split uses a regular expression to find the separators on 
>which to split the string? So your claim is unlikely to be true. In any case, 
>the difference between using split and a single regular expression is likely 
>to be insignificant. You shouldn't worry about such trivial differences. Chris 
>just wants to extract some data from a file, and it won't matter to him if it 
>takes a few extra nanoseconds.
>
>The best advice when worrying about efficiency is this: first get the program 
>working correctly. Then, if it is too slow, find out where the bottlenecks are 
>and try to optimize those. Usually, the most gains can be achieved by changing 
>the algorithm, not the implementation. 
>--
>To unsubscribe, e-mail: beginners-unsubscr...@perl.org
>For additional commands, e-mail: beginners-h...@perl.org
>http://learn.perl.org/
>
>
>

Reply via email to