C++ faster because of less mallocs of intermediate objects. std::vectors of std::tuple much more efficient than NSArrays of NSArrays.
@schwa Note that insert and delete at index 0 is efficient with NSArray and inefficient with std::vector. Does STL have an array-deque?
-
-
@NachoSoto@schwa std::list is a doubly-linked list, not an array-deque. I'm looking for contiguous storage that's open on both ends. - View other replies
-
- View other replies
-
@NachoSoto@schwa std::deque is not guaranteed to be contiguous. I haven't looked at real implementations. -
@NachoSoto@schwa It occurs to me that not-contiguous is necessary to allow the ring buffer implementation. Maybe std::deque is what I want.
-
-
-
.
@gparker@schwa C++ also makes object copies in places ObjC doesn’t. Either can be very slow if used uncarefully.http://stackoverflow.com/questions/6266350/how-can-nsarray-be-this-slow … -
-
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Jonathan Wight
Greg Parker
Nacho Soto
Michael Tsai
Rob Napier
Ned Holbrook