Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Minimize Hash Key Value Combinations

by sundialsvc4 (Abbot)
on Nov 18, 2013 at 14:27 UTC ( #1063100=note: print w/replies, xml ) Need Help??

in reply to Minimize Hash Key Value Combinations

I’m not sure what your intended algorithm is.   That is to say, it is not readily apparent what set of bright-line rules lead from the input to the output shown.

Nevertheless ... surely there must be some misconception about “references,” that you would say (at the same time) “but that’s not what I want” and “I want to do it efficient.”   References are exactly the solution to this sort of problem, where you want (large ...) values to be in several places at one time.   (Note:   this presupposes that you do not need to modify the values independently.)

We need more detailed information about exactly what you are trying to do here, with more detail than what you have given us here, because there are a great many competing factors to consider in the choice of an appropriate data-structure ... a choice that will be a deal-breaker for this project.

  • Comment on Re: Minimize Hash Key Value Combinations

Replies are listed 'Best First'.
Re^2: Minimize Hash Key Value Combinations
by AlexTape (Monk) on Nov 18, 2013 at 14:36 UTC
    well, thank you for your answer!
    i fully agree with what you writing.. but the problem is not the internal storage ir the call by value|name|referenace issue.. itīs about detecting the relations and reduce the branches..
    [A] => [1, 2] [A] => [1]
    is the same like
    [A] => [1, 2]
    i have to mention that A is already related with 1 for that the second A => 1 relation is redundant but it has to be nonredundant :)

    $perlig =~ s/pec/cep/g if 'errors expected';

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1063100]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2018-04-26 01:16 GMT
Find Nodes?
    Voting Booth?