[llvm-commits] [PATCH] SmallVector specialization
peter_cooper at apple.com
Wed Feb 15 22:18:44 CST 2012
Please review this patch to specialize SmallVector::push_back based on whether the type is POD. Basically i'm avoiding the call to placement new which was creating null checks on the pointer. As we know the pointer is never null here this should be safe.
Removal of these null checks allows far more optimization in the common case where we constructed a SmallVector then immediately pushed back into it. The clang executable on x86_64 darwin Release+Asserts goes from 35373352 to 35181016 bytes, a reduction of 188KB.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2096 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20120215/c0b161f4/attachment.obj
More information about the llvm-commits