Manny.Ko at imgtec.com
Wed Jan 23 16:54:22 PST 2013
We should not blinding worship STL. It might be general purpose but it can be a big performance drain in memory and/or runtime. I really like the StringRef class for example.
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Krzysztof Parzyszek
Sent: Sunday, January 20, 2013 7:46 AM
To: Chris Lattner
Cc: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] std::string
On 1/19/2013 10:00 PM, Chris Lattner wrote:
> On Jan 19, 2013, at 7:04 PM, Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote:
>> Were the "small n" characteristics the main motivation?
> It is one of the motivations.
What were the others?
The reason I ask is that STL comes all ready, with containers and algorithms. They may not be optimal for every task, but they do their job and they are part of the standard. There may be some price to pay in terms of performance/memory usage/etc. for a specific application, but overall it may be worth it. Evidently, in case of LLVM, someone
(you?) decided that having local set of containers is a better idea. I simply want to understand the reasons behind this decision.
I quickly looked over the library section on containers in the C++03 standard and I didn't see any paragraphs regarding the allocation strategy for classes like "set" or "map". The LLVM page seems to contain information that was based on some specific implementation (or several implementations), but was not mandated by the standard itself.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation _______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev