Computer Beacon  

Optimized Json Toolkit: v3.0

Posted on 2/21/2012

Today I am proud to present to you the new Json Toolkit v3.0. This version brings significant performance improvement by using a completely redesigned parsing algorithm. The algorithm is much faster and has a speed up of more than 900% (i.e. 10 times faster) than the previous version.

Here are some of the performance comparisons between v2.1 and v3.0 using real JSON data. The running time is measured by looping the parse operation from 1000 to 100000 times (depending on length and complexity of the data).

Sample Data v2.1 v3.0 Speed up
Sample JSON from wiki 11684 ms 1654 ms 606%
Serialized Java servlet 84115 ms 10125 ms 731%
Bing Api object 29296 ms 3260 ms 798%
Facebook Graph object 8030 ms 793 ms 913%

The new algorithm removes unnecessary function calls and also take into consideration the fact that most data in real world scenarios are either string or integer data. Data from Facebook Graph Api are often wrapped in many layers of JSON objects and arrays, which explains why it has the highest speed up among all test data.

Json Toolkit v3.0 is available for download at CodePlex: http://jsontoolkit.codeplex.com/ . The library is fully compatible with the old version as no functionality has changed; simply replace the dll file and recompile the application. The new library is also tested against 50 different test cases with 100% pass.


You must be logged in through Facebook to write comments.

Comments

Kevin Madalosso Veiga amazing... congratulations for the work
on Mar 9