Best data Structure

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello All,

My Need : My application need to log all the trace messages. I dont
want to loose even one.

My Question : Which data strcuture is the best ? Dont worry about
thread scheduling or something . I just want to know which one will be
the most efficient?

My Ideas :

STL Vector : Thought of it but removed it bcos it costed lot of
copies.

STL Deque : Thinking about it ? What you guys say ?

Auto Pointer : Array of auto pointers

Please let me know your views.

Thanks
Rakesh

Re: Best data Structure
On 26 Oct 2004 13:51:13 -0700 in comp.arch.embedded, snipped-for-privacy@gmail.com (Rakesh)

Quoted text here. Click to load it

This is a lot like asking what color is best.
In the absence of more information any answer must have a high degree of
subjectivity.

Are these trace messages being written to disk? flash memory? printer?
Do you care if messages are lost due to power failure?
What format are the messages in?
Are they being stored at the point where they are generated or are they passed
on?
When you say "most efficient", do you mean in terms of space or time or
something else?

The answers to each of these questions can have a large impact upon the decision
of how,
where and how long to store messages.

Good luck

Joe Power


Site Timeline