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

  • SEARCH
  • Home
  • 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 8413335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:54:13+00:00 2026-06-10T00:54:13+00:00

I am trying to convert my app to ARC but when I do it

  • 0

I am trying to convert my app to ARC but when I do it slows down by a factor of 5 🙁

In my graph view I have this block of code that iterates over all points:

            NSLog(@"%f", CACurrentMediaTime());
            for (NSUInteger xIndex = firstXValueOnScreen; xIndex <= lastXValueOnScreen; xIndex++)
            {
                float value = 5; //This used to call a function to get the value but I took out the function call to better demonstrate that this seems to be just a general slowdown...

                if (extremesUninitialized)
                {
                    yMax = value;
                    yMin = value;
                    extremesUninitialized = NO;
                }
                else
                {
                    yMax = MAX(yMax, v,alue);
                    yMin = MIN(yMin, value);
                }
            }
            NSLog(@"%f", CACurrentMediaTime());

Before ARC this block executes in about .01 seconds. Then, I use the ARC converter, which happily converts my code to ARC without any complaints. After this I run the same code under the same circumstances and get a result of .05 seconds! It’s slowed down by a multiple of 5… So I restored my old project from a snapshot, so no more ARC, and did the test like 10 times and consistently got a result of .01 seconds. Then I converted it back to ARC and consistently got .05 seconds. XCode isn’t giving me any clues here as to why this is happening… But the rest of my code is slowing too. What could be going on?

  • 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-06-10T00:54:14+00:00Added an answer on June 10, 2026 at 12:54 am

    There can only be a handful of options – it must be one of these:

    1) your old code uses the optimizer at say -Os and the new code does not (so, you should be testing with “Release”) not “Debug” configuration.

    2) the value of (lastXValueOnScreen – firstXValueOnScreen), ie the range you are doing, is different (for who knows what reason, you would have to do some searching)

    3) There is some background task – some thread – that is running amuck when you enabled ARC but its not there normally.

    So some ideas on how to find this:

    1) double check the Scheme configure setting in both, make sure its Release (not sure if ARC runs slower in Debug or not, but Debug for sure slower than Release).

    2) Add these two values to your log statement above the for loop.

    3) Move this whole chunk of code to your appDelegateLaunched method, before you do anything else , or even better put it in an “+(void)initialize” method in appDelegate (so it runs before any of your other code). Hard code large balues for your two variables.

    Every single doc I’ve read on ARC says its faster; every Apple engineer says its faster; my experience is its faster.

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

Sidebar

Related Questions

I'm trying to convert a Winforms app to a WPF app and have this
I'm trying to convert this app i have from iPhone to iPad.. i've set
I have a string in an Android app that I am trying to convert
I'm trying to convert my app to ARC and the converter is throwing up
I am trying to convert the popular asp.net MVC 2.0 solr.net sample app code
I am trying to convert string to class name. My code is: app.actNum =
I'm trying to convert this Javascript code: self.userSerialEvent = function (join, value, tokens) {
I have been trying to convert my rails 2.2.2 app over to jQuery, and
I'm trying to convert some VC++ 6 code to a console app using only
I'm trying to make a C++ console app that can convert binary(mp3) files to

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.