Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's faster on iPhone? XML pList or JSON?

Tags:

json

iphone

plist

Assuming both XML plist and JSON are delivered over http, gzipped, which one will be processed faster on an iPhone?

like image 865
Henry Avatar asked Aug 19 '10 02:08

Henry


2 Answers

A co-worker and I did some rudimentary benchmarks recently to test which was faster for an application we were writing. We tested this JSON framework, and the NSXML parser as well as a TreeNode parser we found in an Objective-C book. Here is the note I sent to the other developers on our team:

The benchmark tested how each library handled getting the filename and path
of 100 assets, 100 times each (for a total count of 10,000 runs per library).
The results are below:

Method    Average(s)    Total(s)
TreeNode  0.307475      30.747493
NSXML     0.483778      48.377843
JSON      0.233179      23.317870 
like image 116
Mike Trpcic Avatar answered Nov 19 '22 08:11

Mike Trpcic


JSON beats plists according to this: http://samsoff.es/posts/web-services-with-cocoa-surprise

like image 24
Breton Avatar answered Nov 19 '22 07:11

Breton