0

I'm working on a project that draws functions on a plane (Similar to Apple's Grapher utility).

I'have already compiled this app few months ago in Obj-C, and was running clean and fast.

With Swift, I changed a bit the scheme of the app, but I'm still using CGMathParser, a great collection of classes to manipulate and evaluate strings like y=sin(x) or y=log(tan(x))

However the app is now slow and laggy, and I'm thinking that the reason hides in the fact that I'm mixing Swift with Obj-C.

Do you know if there is any kind of parser already optimized for Swift that will be fast enough?

1
  • I think that Swift should work very well with Obj-C. See this question. Commented Jun 22, 2014 at 15:13

1 Answer 1

2

The Swift compiler enforces bounds checks and various other 'safety' features. If you compile with the -Ofast option these checks are removed, which typically makes your app run a lot faster.

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

This now appears to have been changed in Xcode 8.3.2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.