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

Re: flattening Complex Datastructures

by Ctrl-z (Friar)
on Feb 11, 2003 at 17:32 UTC ( #234467=note: print w/replies, xml ) Need Help??

in reply to flattening Complex Datastructures

great responses, thanks.

Im not too smart with the big O notation, but I did realise that grabbing subtrees or grouping by a specific node would slow right down. I suppose there must be algorithms and other comp.sci stuff that can minimize that?.

In hindsight, i think what appeals the most about this, is that it flattens a HoH to single key/value pairs, but preserves the internal structure. Translating between these two structures seems like it could be handy for...umm, loads of stuff. Multi-level CGI params, dumping/slurping data-structures in EMCA-esque script...loads of stuff!.

Well, I think curiosity is getting the better of me and Im gonna throw a module together and benchmark it. If anyone has ideas on improving the lookup deficiencies, or anything else, please feel free to contribute.

time was, I could move my arms like a bird and...

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2018-02-18 22:33 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (257 votes). Check out past polls.