> Replace perf_bundle's event_names std::vector<char*> with std::map<int, 
> char*>.
> event_names is access by trace_event idx, which is on my machine somewhere
> around 70 -- 73. That means that nearly 70*sizeof(char*) is wasted.
> Though std::map stores 3 pointers (left, right, parent) for each element, 
> still 
> less than 70 pointers. We're losing constant access time (operator[] is 
> base + sizeof(TYPE)), yet on our datasets O(log n) unlikely will impact 
> performance.

Sorry, I wasn't exact here:

On CPU side I have:     71  72 
On process side:        29  31  35  36  37  38  42  43  47  48  55  56  72

So we have more gaps than commit message says. 


p.s. 
minor nit: of course operator[] for vector is `base + i * sizeof(TYPE)'


        Sergey

Attachment: pgp6agUuAR0Mo.pgp
Description: PGP signature

_______________________________________________
Discuss mailing list
Discuss@lesswatts.org
http://lists.lesswatts.org/listinfo/discuss

Reply via email to