Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Combinations of lists, etc (updated)

by tel2 (Pilgrim)
on Oct 07, 2019 at 02:55 UTC ( [id://11107116]=note: print w/replies, xml ) Need Help??


in reply to Re: Combinations of lists, etc (updated)
in thread Combinations of lists to a hash

My hours of messing around was a secondary consideration in this case, because I thought loading a module would be slightly less efficient than in-line code, especially for this regularly hit situation (i.e. every page load on my website).

I'm deeply honoured and even impressed that you wrote that module as a result of my problem, haukex.  Thank you.  Don't forget to include me in the credits.   My name is spelt: "Some Kiwi Novice @ PerlMonks".

  • Comment on Re^2: Combinations of lists, etc (updated)

Replies are listed 'Best First'.
Re^3: Combinations of lists, etc
by haukex (Archbishop) on Oct 07, 2019 at 08:56 UTC
    My hours of messing around was a secondary consideration in this case, because I thought loading a module would be slightly less efficient than in-line code, especially for this regularly hit situation (i.e. every page load on my website).

    Yes, the code could certainly be inlined, hence the ::Tiny. Although depending on how many items you're generating, a speed boost in generating combinations by a factor of roughly 10x can be achieved with XS modules such as Set::Product::XS.

    Don't forget to include me in the credits. My name is spelt: "Some Kiwi Novice @ PerlMonks".

    Done :-)

      The number of items being generated is pretty low - usually a hundred or less.  For that I thought the loading of a module would be a relatively high overhead for a job which I hoped could be done with a small amount of non-module code, (and the answers have confirmed it's just a small amount of code).  Thanks for the Set::Product::XS tip.

      And thanks for the credits, haukex.  At last I've reached a level of fame in the Perl world.  Good to meet another person who knows how to take humour seriously.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-09-10 18:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (6 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.