On May 11, 2010, at 8:40 PM, Andrew Sutton wrote:> > What's driving libc++? > > The possibility of being a superior solution. > > I thought "to support Apple applications" from the previous post was sufficient motivation :) Either way, I'm excited about a new library. Plus, it looks a little easier to read (from the tiny amount of code that I've looked at). > > libc++: > > 5 seconds > > libstdc++: > > 22 seconds > > (smaller is better) > > Is this libstdc++ with or without rvalue references?This was compiled with g++-4.-2 -O3 (without rvalue references, which would have no effect on sorting ints anyway). -Howard
Christopher Jefferson
2010-May-12 15:03 UTC
[LLVMdev] [cfe-dev] New libc++ LLVM Subproject
On 12 May 2010, at 15:52, Daniel Berlin wrote:>> >> This was compiled with g++-4.-2 -O3 (without rvalue references, which would have no effect on sorting ints anyway). > > Errr, that is a pretty old version at this point. > Also this was before significant performance improvements were target > at libstdc++ *and* g++. > It seems a bit strange to compare something from today to something > that is now 3 release versions old.I believe this std::sort implementation is better, taking a few good ideas, especially with regards already most-sorted lists. Of course the libc++ could easily be lifted out and dropped into libstdc++ with very minor mangling-related changes without breaking anything. The container changes are more fundamental, and in particular would (obviously) break the ABI, which libstdc++ has avoided for some time, even when there are known better implementation techniques (issues in std::string, and small object allocation, occur in particular). Chris
> Errr, that is a pretty old version at this point. > Also this was before significant performance improvements were target > at libstdc++ *and* g++.Because this is the last version of gcc "oficially" available for darwin? Noone cares about newer gcc / libstdc++ there. I consider this pretty strange as well :) -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University