novoda / simple-easy-xml-parser

Simple XML Parsing into Domain Objects
Other
69 stars 32 forks source link

Benchmarking #41

Closed juankysoriano closed 8 years ago

juankysoriano commented 8 years ago

The following PR includes a benchmark module comparing three different XML parsers:

The benchmark is performed for two different sets of data, small.xml and medium.xml.

screen shot 2015-12-27 at 17 55 18

The results of the benchmarking gets special relevance by analysing the medium data set. Our benchmarking shows that SEXP is performing faster than it's competitors:

1.7x faster than Jackson 2.5x faster than Simple-Framework,

Further SEXP is way more efficient in terms of memory allocation, which could be a more than reasonable argument to make use of it in your mobile applications.

NOTE: The benchmarking has been performing using Caliper; Google’s open-source framework for writing, running and viewing the results of Java Microbenchmarks. We understand our tests have been ran on a JVM and this could influence the results vs Dalvik. In the future we will be also running an Android benchmark.

juankysoriano commented 8 years ago

@blundell santa claus is coming!

blundell commented 8 years ago

:100:

ouchadam commented 8 years ago

awesome stuff :+1:

simplexml makes a whole lot of objects. Must be autoboxing?

xrigau commented 8 years ago

maybe @ouchadam and it also has to create all the objects for reflection so that will add too!

amlcurran commented 8 years ago

How about a large file as well? The files you guys use are generally a fair bit larger than the two examples benchmarked here

juankysoriano commented 8 years ago

@blundell @amlcurran I have modified the medium.xml set to parse 100 entry elements.

With this test SEXP is revealing itself as a very fast and efficient XML parser as it parses 2.5x faster than Simple-Framework and 1.7x faster than Jackson.

ouchadam commented 8 years ago

where are these time taken numbers?

juankysoriano commented 8 years ago

@ouchadam There is a screenshot in the PR description showing numbers. The screenshot is taken from here:

https://microbenchmarks.appspot.com/runs/39f714bc-544b-4c87-8b2e-fafcfae68e84#r:scenario.vmSpec.options.BackgroundCompilation,scenario.vmSpec.options.UseCompiler,scenario.vmSpec.options.UseFastAccessorMethods,scenario.vmSpec.options.UseFastEmptyMethods,scenario.vmSpec.options.UseLoopCounter,scenario.vmSpec.options.UseOnStackReplacement,scenario.benchmarkSpec.methodName,scenario.vmSpec.properties.java.vm.info

ouchadam commented 8 years ago

I thought runtime was still objects! oops

blundell commented 8 years ago

:+1: LGTM

xrigau commented 8 years ago

yayy :+1: good news!