execution speed in swift and objective C

Hi,

I would like to create a time history analysis program for buildings and bridges submitted to earthquake.

There are many matrices calculations.The more important subroutine solving the differential equation of motion could be writen in swift or objective C.

Which of the 2 will execute faster ?

IT is important for me.

Best regards,


Alfred

Accepted Answer

The only way to know for sure is to write both and measure the performance.

Before doing that, however, my advice is that you look at the various APIs for matrix operations in the Accelerate framework. These routines were carefully constructed by numerics experts here at Apple. If they work for you, you may find that you don’t need to write any low-level numerics code, at which point it doesn’t matter which language is faster.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thank you very much eskimo,

are the modules like accelerate framework included in XCODE 9.4.1 or do I have to load them and import ?


Best regards, Alfred

Accelerate framework in included in the SDKs come with Xcode 9.4.1.


You can use it without any additional setups. Just write `import Accelerate` in the .swift file which uses the functionality of Accelerate.

(You may need some other `import`s, but that's all you need.)

Thank you verymuch OOPer.

This will help me a lot

Best regards,


Alfred

execution speed in swift and objective C
 
 
Q