Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6559483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:19:57+00:00 2026-05-25T13:19:57+00:00

Ive been wondering, how much faster does c run than objective c? From what

  • 0

Ive been wondering, how much faster does c run than objective c? From what I understand c does run faster. I recently implemented a maths function in my app (written in standard c) in the hope that it would increase speed but does it really have that much of an effect?

cheers GC

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:19:58+00:00Added an answer on May 25, 2026 at 1:19 pm

    As others have said, the algorithm is more important than the language. Having said that, there is no question that sometimes you have to optimize speed sensitive code. Every Objective-C method call requires more instructions than a plain-old C function call. Allocating objects in tight game loops is generally a bad idea as well and both iOS and Mac OS X calls tend to allocate a lot of objects.

    In the old days, even a C++ method call would be too slow in a tight loop and C++ method calls are generally faster than Objective-C ones. On modern machines you don’t see these sorts of problems as much, but they do still exist. Core Audio filters are a good example of code that needs to be written in plain C rather than Objective-C due to speed issues.

    What I would recommend is to write your code using Objective-C and then run it to see if it’s too slow. If so, run Instruments and see where you are spending most of your time. Then optimize that code using plain C, C++, or even assembly language (ok, just kidding about assembly language unless you’re really pushing the envelope).

    If you find the method call overhead within loops is slowing you down, you can optimize that by using plain C function calls, inline routines, unrolling the loop, or by using IMP pointers to avoid the method lookup overhead.

    If you find that you are copying around data too much, you can optimize that by sharing buffers rather than copying them or maybe using [NSData dataWithBytesNoCopy] rather than [NSData dataWithBytes], etc.

    Sometimes you can optimize your graphics so they draw faster — remove transparencies where they’re not needed. Don’t use CALayer shadows or blurs. All new Macs and many iOS devices have two or more CPU cores, so maybe you can offload some processing to the second core using threads. The list goes on and on.

    So write your app first using Objective-C using reasonable algorithms and then optimize later when you see where the problems are. Don’t do anything too stupid, like looping n^2 times through a large array in a tight loop, and you’ll probably be ok for 90% of your code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been wondering this for a while but since it hasn't come up much
I've been wondering this for some time. As the title say, which is faster,
I've been wondering whether using prototypes in JavaScript should be more memory efficient than
I've been reading about drupal install profiles, and I'm wondering if there's much of
Question pretty much explains it all. I've been wondering why Java has nice, organized
Recently I've been craving some game programming. I primarily use Linux, and was wondering
good evening all. ive been reading up on the command pattern and im wondering
I've been wondering for a while how github.com does it's navigation. If you enter
i was wondering if anyone could help me with css. ive been stuck on
I've been wondering, what is the point of clog? As near as I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.