36

iphone – Objective C足够快,可用于DSP /音频编程

 5 years ago
source link: https://codeday.me/bug/20190112/520672.html?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

有什么想法吗?

Objective-C和DSP等功能的问题本身并不是速度,而是不可避免的瓶颈何时发生的不确定性.

所有语言都存在瓶颈,但在像C这样的静态链接语言中,您可以更好地预测代码的发生时间和位置.在Objective-C的运行时耦合的情况下,找到适当对象所花费的时间,发送消息所花费的时间并不是必须缓慢,但它是可变且不可预测的. Objective-C在UI,数据管理和重用方面的灵活性可以在紧迫的时间任务的情况下对其进行工作.

Apple API中的大多数音频处理都是在C或C中完成的,因为需要确定执行代码所需的时间.但是,它很容易在同一个应用程序中混合Objective-C,C和C.这使您可以为手头的即时任务选择最佳语言.

翻译自:https://stackoverflow.com/questions/2761388/is-objective-c-fast-enough-for-dsp-audio-programming


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK