[LLVMdev] Choosing the right data structure

Chris Lattner sabre at nondot.org
Sat Feb 3 12:32:02 PST 2007


I'm recently been doing work to tune the way that LLVM uses (and abuses) 
memory.  In the past, we typically choose to use a std::vector, std::set, 
or std::map by default, with little thought of the consequences.  Because 
the options are many and the trade-offs are complex, I've written up a 
guide on how to pick the right vector-like, set-like, or map-like 
container for a job.

I'd appreciate it if everyone making data structure choices in LLVM would 
at least skim through it -- I suspect most people aren't aware of all the 
options we have:
http://llvm.org/docs/ProgrammersManual.html#datastructure

Comments and feedback are welcome, of course :).

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list