I have changed the std::list to a kind of intrusive list (each element has pointers to parent, previous and next siblings and first child).
I still have to adapt the quicksort algorithm, but the timings with CB project look better. Below are the old times (tree creation times revised) wth the new ones at the right side (remember, no sort).
- Current projects symbols
- tree creation 36 ms, now 8 ms
- top tree dump 227 ms, now 15 ms
- bottom tree (creation+dump)
- Global functions 40+132, now 21+105
- Global typedefs 16+29, now 13+26
- Global variables 32+97, now 17+77
- Macro definitions 390+1093, now 167+707
- Everything
- tree creation 427 ms, now 241 ms
- top tree dump 452 ms, now 159 ms
- bottom tree (creation+dump)
- Global functions 1720+7702, now 838+2264
- Global typedefs 634+2003, now 329+1496
- Global variables 183+526, now 114+435
- Macro definitions 12321+26790, now 5803+14174
The top tree creation is made in the worker thread, while the dump and the bottom tree work are made in the main thread.