asymptotics of tree versus map

T

Travis

I'm curious how these two structures match up for my use. I've created
a custom tree which is not sorted and each node can have infinite
children. Why? Because each node is a menu in a simple GUI and the
tree is created once and traversal is then rather trivial bopping from
menu to menu is never more than one link away.

Unfortunately this tree has become a maintenance item for me and I'm
considering relieving myself of it. I thought of all the STL options
available, the map might be the one that might beat it out in
performance. Again, the map would be created once and then I'd have to
find a node based on a key value (I've been using the string name of
the menu as a unique key for the overloaded == operator used for the
tree).

Thoughts?
 
K

Kaz Kylheku

Thoughts?

How many of these GUI menu objects are actually instantiated in
production software that uses the GUI? How broad and deep is the
actual tree?

Does it matter whether a replacement data structure ``beats it out''
in asymptotic performance?

Will an actual user of actual software perceive difference in response
time when navigating these menus?
 
T

Travis

How many of these GUI menu objects are actually instantiated in
production  software that uses the GUI? How broad and deep is the
actual tree?

Does it matter whether a replacement data structure ``beats it out''
in asymptotic performance?

Will an actual user of actual software perceive difference in response
time when navigating these menus?

It's an administration menu for a kiosk device. I really can't go into
more details. Imagine an ATM. I'd say any given node (read: menu)
might have 8-10 children (submenus). It's so much that I'm looking for
a faster alternative, but more looking for a vetted, rock-solid,
structure that is both efficient and stable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top