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

Re^4: Performance problems on splitting long strings

by Laurent_R (Canon)
on Jan 30, 2014 at 22:35 UTC ( [id://1072747]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Performance problems on splitting long strings
in thread Performance problems on splitting long strings

Why then did you not bother to write a few lines like:...

Thank you for your answer, hdb, I think I said quite clearly in the original post that I intended to do a benchmark and that I was really looking for some ideas on possibly more efficient ways of doing the splitting, in order to benchmark them along with the ideas I explained. Possibly a Perl function unknown to me, or a use that I did not think about of a function known to me, or a module that I don't know about, whatever. As for the unpack function, I have used it about 5 times in the last 10 years and I had forgotten about the '*' option and I missed it when I looked at the documentation (which, in my humble opinion, could be clearer). Lacking that option, working my way around it was possible but would have made the benchmark less significant because of the added penalty due to this workaround.

I will benchmark all the options that have proposed here and publish the results later on this post.

Replies are listed 'Best First'.
Re^5: Performance problems on splitting long strings
by hdb (Monsignor) on Jan 31, 2014 at 07:33 UTC

    Laurent_R,

    please don't take my teasing too seriously. Last night when I was looking for a little challenge on PM I was annoyed that I could not just paste ideas into a given benchmarking script but had to write it myself and code your detailed verbal descriptions of alternatives. (And then found that I made a good number of mistakes when doing so in anger...)

    So I thought it was funny to reply to the post of a senior monk with one of those "please read this before posting" comments.

    Looking forward to your conclusions from the Benchmarking.

    hdb

      Hi hdb,

      I have no problem with your previous post (which I upvoted, BTW). I appreciate your point that it would have been better if I had posted the beginning of a benchmark, I am sorry about that, but I had not yet prepared the benchmark when I posted the original post, simply because I was waiting for the ideas offered by various monks to prepare it.

      The results of the benchmark, along with the code, have now been posted.

Re^5: Performance problems on splitting long strings
by AnomalousMonk (Archbishop) on Jan 31, 2014 at 22:57 UTC
    ... unpack ... documentation ... could be clearer ...

    You've probably seen this already, but take a look at perlpacktut, esp. Template Grouping.

      Thank you very much, AnomalousMonk, I looked at it and I am pretty sure that I had seen this document before, but I had completely forgotten about it. I have bookmarked it now, hopefully I'll find it next time I need such documentation.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-25 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found