in reply to Re: Delete a line
in thread Delete a line

Thank you very much for this really interesting benchmark, thanos1983, I knew that substr was likely to be faster than a regex for that type of case, but I never thought about using ord for that and did not imagine it would be so significantly faster. I still have to figure out whether it makes a significant difference in my use cases (typically reading a very large file and discarding a sizable fraction of its lines), but I might make good use of that to enhance the performance of some of my programs.

Replies are listed 'Best First'.
Re^3: Delete a line
by thanos1983 (Parson) on Dec 24, 2017 at 16:57 UTC

    Hello Laurent_R,

    I love timing things and playing with details. To me it does not make any difference, any solution would choose work just fine since I am not handling huge files.

    I am glad that someone else can take advantage of this maybe in the future.

    BR / Thanos

    Seeking for Perl wisdom...on the process of learning...not there...yet!