Fastest Inverse Square Root on iPhone

前端 未结 2 1620
广开言路
广开言路 2021-01-18 12:00

I\'m working on an iPhone app that involves certain physics calculations that are done thousands of times per second. I am working on optimizing the code to improve the fra

2条回答
  •  失恋的感觉
    2021-01-18 12:49

    The accepted answer of the question you've linked already provides the answer, but doesn't spell it out:

    #import 
    
    void foo() {
        float32x2_t inverseSqrt = vrsqrte_f32(someFloat);
    }
    

    Header and function are already provided by the iOS SDK.

提交回复
热议问题