Your browser (Internet Explorer 7 or lower) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.

X

C/C++ is still the only way to have high performance on Mobiles

[Edit 15-Nov-2012] I had questions on reddit about the data-structures and algorithms we used. We develop an embedded search engine for mobiles and tests were done on our own data-structure that is far more efficient than SQLite or other platform options for this use-case. [/Edit]

When it comes to programming languages and performance, you can read all and its opposite on the web. It’s definitely a very controversial topic!

For Algolia the story started when researching an instant suggest algorithm and I used Java for two reasons:

  • Main reason: our first client was using Java on Google App Engine
  • Secondary: at that stage, I was doing a lots of refactoring and Eclipse is very efficient for these tasks

Once our algorithm was designed, I started to optimize performance on a desktop computer (core I7 950). For this, I indexed all titles of the english version of wikipedia (4 millions titles) and I optimized the Java code mainly by reducing the number of allocations. All instant suggest queries were then faster than 10ms.
Continue reading…

iOS: When ARC is a bad idea

I started developing for iOS in 2009 by learning about Objective-C language. At that time ARC (Automatic Reference Counting) was not yet available and developers were responsible for alloc/release/autorelease. I found it pretty straightforward as it was very similar to C++ and the resulting code was very self-explanatory.

When ARC was released at the end of 2011 it made a great impression on me and looked like the perfect feature for any programmer coming from the Java world who was not familiar with memory management. I started using ARC and discovered a major flaw that completely changed my mind. Here is an example :

[Edit 28-Jan-2013] This post describes a bug in ARC that was fixed in Xcode 4.4.[/Edit]
Continue reading…