The following performance numbers where measured with the performance test suite that is distributed with Skaringa (Package com.skaringa.perftest).
We see, that for complex objects, like vectors and sets, Skaringa is as fast as native Java serialization via ObjectOutputStream.writeObject() respectively ObjectInputStream.readObject(). Only for simple Java types, like arrays of int, native Java serialization outperforms Skaringa.
The tests were executed in sequential order.
Testclass: | com.skaringa.perftest.SkaringaPerfTest |
Parallel: | false |
Date: | 2008-07-12T19:47:57+02:00 |
Hardware: | Dual 2.66 GHz Intel Core2, 3 GByte RAM |
OS: | Windows XP 5.1 / x86 |
JVM: | 1.5.0_15 Sun Microsystems Inc. |
SAX Parser: | com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl |
Transformer: | com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl |
Lesser time values mean better performance!
Method | Data type | Data size [elements] | Random data | Average time per test [ms] |
---|---|---|---|---|
SerializeSkaringaXml | com.skaringa.javaxml.test.IntVectorObj | 10000 | false | 26.0 |
SerializeSkaringaJson | com.skaringa.javaxml.test.IntVectorObj | 10000 | false | 23.0 |
SerializeJava | com.skaringa.javaxml.test.IntVectorObj | 10000 | false | 64.0 |
DeserializeSkaringaXml | com.skaringa.javaxml.test.IntVectorObj | 10000 | false | 85.0 |
DeserializeSkaringaJson | com.skaringa.javaxml.test.IntVectorObj | 10000 | false | 85.0 |
DeserializeJava | com.skaringa.javaxml.test.IntVectorObj | 10000 | false | 64.0 |
SerializeSkaringaXml | com.skaringa.javaxml.test.SetObj | 10000 | false | 21.0 |
SerializeSkaringaJson | com.skaringa.javaxml.test.SetObj | 10000 | false | 48.0 |
SerializeJava | com.skaringa.javaxml.test.SetObj | 10000 | false | 34.0 |
DeserializeSkaringaXml | com.skaringa.javaxml.test.SetObj | 10000 | false | 103.0 |
DeserializeSkaringaJson | com.skaringa.javaxml.test.SetObj | 10000 | false | 129.0 |
DeserializeJava | com.skaringa.javaxml.test.SetObj | 10000 | false | 56.0 |
SerializeSkaringaXml | com.skaringa.javaxml.test.ArrayObj | 10000 | false | 23.0 |
SerializeSkaringaJson | com.skaringa.javaxml.test.ArrayObj | 10000 | false | 20.0 |
SerializeJava | com.skaringa.javaxml.test.ArrayObj | 10000 | false | 1.0 |
DeserializeSkaringaXml | com.skaringa.javaxml.test.ArrayObj | 10000 | false | 78.0 |
DeserializeSkaringaJson | com.skaringa.javaxml.test.ArrayObj | 10000 | false | 37.0 |
DeserializeJava | com.skaringa.javaxml.test.ArrayObj | 10000 | false | 0.0 |
The tests were executed at the same time in parallel threads.
Testclass: | com.skaringa.perftest.SkaringaPerfTest |
Parallel: | true |
Date: | 2008-07-12T19:53:02+02:00 |
Hardware: | Dual 2.66 GHz Intel Core2, 3 GByte RAM |
OS: | Windows XP 5.1 / x86 |
JVM: | 1.5.0_15 Sun Microsystems Inc. |
SAX Parser: | com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl |
Transformer: | com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl |
Lesser time values mean better performance!
Method | Data type | Data size [elements] | Random data | Average time per test [ms] |
---|---|---|---|---|
SerializeSkaringaXml | com.skaringa.javaxml.test.IntVectorObj | 10000 | false | 296.0 |
SerializeSkaringaJson | com.skaringa.javaxml.test.IntVectorObj | 10000 | false | 273.0 |
SerializeJava | com.skaringa.javaxml.test.IntVectorObj | 10000 | false | 103.0 |
DeserializeSkaringaXml | com.skaringa.javaxml.test.IntVectorObj | 10000 | false | 125.0 |
DeserializeSkaringaJson | com.skaringa.javaxml.test.IntVectorObj | 10000 | false | 379.0 |
DeserializeJava | com.skaringa.javaxml.test.IntVectorObj | 10000 | false | 73.0 |
SerializeSkaringaXml | com.skaringa.javaxml.test.SetObj | 10000 | false | 567.0 |
SerializeSkaringaJson | com.skaringa.javaxml.test.SetObj | 10000 | false | 671.0 |
SerializeJava | com.skaringa.javaxml.test.SetObj | 10000 | false | 64.0 |
DeserializeSkaringaXml | com.skaringa.javaxml.test.SetObj | 10000 | false | 184.0 |
DeserializeSkaringaJson | com.skaringa.javaxml.test.SetObj | 10000 | false | 260.0 |
DeserializeJava | com.skaringa.javaxml.test.SetObj | 10000 | false | 68.0 |
SerializeSkaringaXml | com.skaringa.javaxml.test.ArrayObj | 10000 | false | 504.0 |
SerializeSkaringaJson | com.skaringa.javaxml.test.ArrayObj | 10000 | false | 490.0 |
SerializeJava | com.skaringa.javaxml.test.ArrayObj | 10000 | false | 6.0 |
DeserializeSkaringaXml | com.skaringa.javaxml.test.ArrayObj | 10000 | false | 153.0 |
DeserializeSkaringaJson | com.skaringa.javaxml.test.ArrayObj | 10000 | false | 226.0 |
DeserializeJava | com.skaringa.javaxml.test.ArrayObj | 10000 | false | 0.0 |