title: Will my iPhone app take a performance hit if I use Objective-C for low level code?
body: <p>When programming a CPU intensive or GPU intensive application on the iPhone or other portable hardware, you have to make wise algorithmic decisions to make your code fast.</p>
  
  <p>But even great algorithm choices can be slow if the language you're using performs more poorly than another.</p>
  
  <p>Is there any hard data comparing Objective-C to C++, specifically on the iPhone but maybe just on the Mac desktop, for performance of various similar language aspects?  I am very familiar with <a href="https://stackoverflow.com/questions/826281/better-performance-with-libxml2-or-nsxmlparser-on-the-iphone">this article comparing C and Objective-C</a>, but this is a larger question of comparing two object oriented languages to each other.</p>
  
  <p>For example, is a C++ vtable lookup really faster than an Obj-C message?  How much faster?  Threading, polymorphism, sorting, etc.  Before I go on a quest to build a project with duplicate object models and various test code, I want to know if anybody has already done this and what the results where.  This type of testing and comparison is a project in and of itself and can take a considerable amount of time.  Maybe this isn't one project, but two and only the outputs can be compared.</p>
  
  <p>I'm looking for <strong>hard data</strong>, not evangelism.  Like many of you I love and hate both languages for various reasons.  Furthermore, if there is someone out there actively pursuing this same thing I'd be interesting in pitching in some code to see the end results, and I'm sure others would help out too.  My guess is that they both have strengths and weaknesses, my goal is to find out precisely what they are so that they can be avoided/exploited in real-world scenarios.</p>