Giter Site home page Giter Site logo

zathomas / javajsonperformancetest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from novoj/javajsonperformancetest

0.0 2.0 0.0 511 KB

Test suite testing performance of common Java JSON parsers and marshallers.

Home Page: http://blog.novoj.net

Java 28.90% Groovy 71.10%

javajsonperformancetest's Introduction

Benchmarks (2012-01-31)
======================

Tested use case is a serialization of a rich POJO with collection of inner POJOs, referencing another POJO (see PhotoAlbum model object). Tested JSON parser must have had and direct POJO to JSON serialization and deserialization support in order to get to the suite. I've used all libraries by same naive approach - get it and use it the simpliest way possible. No tweaking, no optimalizing whatsoever (that's the way they are usually used). Average size of JSON generated JSON data is 160KB so it is rather big. The problem in production was caused by data of 33KB size in my case.

*Disclaimer* microbenchmarking results may be misleading - if you want to be sure write your own, with your custom data on your hardware to be really sure.

*Setup*
*Hardware:* Intel® Core™2 Duo CPU T7500 @ 2.20GHz × 2, SSD disk (but File IO time is not counted)
*Software:* Java(TM) SE Runtime Environment (build 1.6.0_23-b05), Java HotSpot(TM) Server VM on Ubuntu Linux 11.10 32-bit
*JVM options:* -Xmx32m -server

Data value being tested: PhotoAlbum.

Methodology:
------------

Before taking measurements, I warmed things up by running the task 250 times, next 3000 loops are counted. No other operations than the serialization or deserialization is measured. Finally average execution time is taken for each opearation and library.

Tested libraries and their versions:

- FlexJson (2.1)
- GSon (2.1)
- Jackson (1.9.4)
- JsonLib (2.4)
- JsonMarshaller (0.21)
- JsonSmart (2.0-beta2)
- Protostuff JSON (1.0.4)
- XStream (1.4.2)

Testing code is placed at GitHub: https://github.com/novoj/JavaJsonPerformanceTest

javajsonperformancetest's People

Contributors

novoj avatar zathomas avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.