开发者

STL vector and NSArray speed

开发者 https://www.devze.com 2023-03-07 11:53 出处:网络
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,

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号