STL vector and NSArray speed
Is STL
vector faster than NSArray
? NSArray
looks somewhat more checked and slower. If vec开发者_StackOverflow中文版tor
is faster, is there any way I can get STL
in objective-c
?
If you want to use STL, you should go for Objective-C++, which you can think of as the same as Objective-C, but based on C++.
This will allow you to use straight C++ with .cpp files and combination code (objective-C mixed with C++) with .mm files.
(You don't really need doiong anything special to use it, it's fully supported by Xcode once you adopt the .mm convention for mixed languages files)
精彩评论