Slashdot Mirror


User: grogovich

grogovich's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. Select the best tool for the job on Facebook Has a New Private Mobile Photo-Sharing App, and They Built It In C++ · · Score: 1

    Please note the following quotes from the article:

    With C++, “a lot of our more complicated logic can be written once and run on both iOS and Android,”

    Due to the complexity and the performance required, HTML / Cordova were not viable options ( see http://magenic.com/Blog/Post/4... Test 4: Prime Number Calculation, where cordova takes 12 - 23 times longer to run than native / xamarin). This performance is not an issue for most applications, but for something like face detection you bet this has an impact.

    In regards to Xamarin, it could have been a viable solution. The main issue here though is that doing work on images is a lot harder to do performant without pointers in c# (ignoring unsafe code), and in a portable class library so it can be shared (limited support for images).

    The best performance wise (ignoring memory, Xamarin seems to manage memory better in most instances) would be to go native. But doing this means that you would have to write the complex calculations twice, once in swift/objc and java.

    So this leaves doing it in c++. This is indeed possible, but you would only do this when you have very complex and performance dependant code that you do not want to write twice (for example, image manipulation). If you pick c++ for any other reason, you are most likely picking the wrong technology as it is more difficult to write mobile applications in c++ than the other languages (yes, the other languages have abstractions, that is because most applications have no need to care about low level operations).

    So Facebook, look at their business problem and solves it using the best tool available. This does not mean that c++ is the correct technology for all cases.