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 6212469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:31:18+00:00 2026-05-24T06:31:18+00:00

I was required to add an exotic image format to a project. The client

  • 0

I was required to add an exotic image format to a project. The client supplied only a c++ library. The library does it’s work extremely slow once compiled in a predominantly Objective-C project (that is, a project with all the rest of the code in objective-c)

I’ve compared performance with c++ implementations on a Mac and a PC, a ported C# implementation to a pc – all on computers similar to each other (CPU and memory-wise). The slow performance is only in the Objective-C project, much more evident on a device than on the simulator. I would expect a pentalty for the device’s (iPad) less-than-mac/pc CPU, but not to go from 0.2 secs image parsing in the simulator to a staggering 2.4 secs per image on the device!
Does all c++ code added to an Objective-C project perform so slow?

Tweaked with all compiler kinds, many compiler preferences. Also time-profiled to realize the c++ code takes huge amounts of time on trivial actions (simple instructions such as ++’s and +=’s).

How should i approach this in order to get the c++ library’s performance to a reasonable level within the objective-c project?

  • 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-24T06:31:18+00:00Added an answer on May 24, 2026 at 6:31 am

    I’ve compared performance with c++ implementations on a Mac and a PC,
    a ported C# implementation on a pc – all on similar computers CPU and
    memory-wise. The slow performance is only in an Objective-C project,
    much more evident on a device than on the simulator.

    iOS devices are relatively powerful considering their size and battery constraints, but they’re no match for a modern Mac or PC. You’d expect to find a significant slowdown of any code, C++ or otherwise, when running on a device compared to the simulator. When you say that you tested “all on similar computers” do you mean similar to each other or similar to, say, an iPhone 4?

    I don’t know of any particular performance penalty attached to using C++ together with Objective-C. You could test for yourself by coming up with some very simple benchmark, coding it in both C++ and Objective-C, and comparing execution times.

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

Sidebar

Related Questions

I've tried to work with isset() to add required fields to my form as
How does one add required/optional attendees + organizer(s) to an iCal event? I'm using
During one of my project i need to add required field validation on the
I'm not sure if namespaces are required for valid/correct XML. Can I add arbitrary
Entity Framework has created the required partial classes. I can add these partial classes
I add this class to library/My/Validate/PasswordConfirmation.php <?php require_once 'Zend/Validate/Abstract.php'; class My_Validate_PasswordConfirmation extends Zend_Validate_Abstract {
Since the only operations required for a container to be used in a stack
My manager has asked me to assess what changes would be required to add
When I create a new MVC3 application, add a model, add a [Required] attribute
If I add [Required] in my entity class then unobtrusive validation works fine. [Required]

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.