Does the iOS-Simulator use multiple cores?

泪湿孤枕 提交于 2019-12-22 02:29:27

问题


Now that the iPad 2 comes with two CPU cores, the debugging of threading issues will be more important than ever. Now I'm wondering: Does the iOS-Simulator actually use the multiple cores available on the Mac?


回答1:


To run iOS programs on the simulator, Xcode compiles your program for the Intel processor. The simulator does not emulate an ARM processor, so exact execution of threaded code will differ from an iOS device and the simulator. Regardless of how many cores the iOS simulator uses, threaded code execution may vary greatly between the ARM processors in iOS devices and the Intel processor running on the Mac. Therefore any issues that crop up due to the multicore iPad 2 processor may or may not show up in the simulator.

In other words, you'll want to debug such issues on the iPad 2, not the simulator, so it doesn't matter how many cores the simulator uses.




回答2:


I created a special test app for you. And here is the result:



来源:https://stackoverflow.com/questions/5172775/does-the-ios-simulator-use-multiple-cores

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!