BrowserUk,
I had originally always intended it to be an iterator but it would have made describing the algorithm more difficult. I made no effort at optimization so it can probably be improved greatly.
I have submitted a bug report on List::Util indicating that the documentation should be explicit about the single return value or the implementation should be changed. I suspect you are right and the fix is a doc update.
I have read through the perldeltas for 5.9.0 - 5.9.4 and did not see anything regarding sub call speedups.
I am interested in Benchmark results using real data. One optimization could be made by only handling 4 arrays and using a hardcode @cont of 4 instead of both being user defined.
You mentioned earlier not understanding tye's Algorithm::Loops. I won't pretend to understand his code either but I do understand the methodology. If you haven't seen Arbitrarily Nested Loops and NestedLoops and the Odometer Model, they may help explain it.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.