Re:Google paper comparing performance of C++, Java, Scala, a...
by davidtgoldblatt on Friday June 03, 2011 @01:49PM
(#2617278)
In a confusing bit of ISO trivia, std::list implementations can do either - the standards draw a distinction between "should" and "shall". If an implementation "shall" do something, it's a requirement, and if it "should" do something, it's the preferred choice among several. The size() function only "should" be constant time. In fact, in GCC (which I assume is the Google compiler of choice), std::list::size() is O(n) (http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a0142...).
[ Parent
| on HN ]
There are no comments on this comment yet.