Benchmark results are always dependent on a very individual setup. Normally it is not useful to generalize such results for every use case, but it can give you a hint. However, if you're really in the need of maximum performance, you should probably create an own benchmark with your objects or even use a profiler to detect the real hot spots in your application.
|Parser||Single Value Converters||Standard Converters||Reflection Converter||Serializable Converter|
The values have been generated running the ParserBenchmark harness of the XStream benchmark module's test code.
- Single Value Converters
- A list with a set of 10 objects of different types (like String, int, File, Locale, Double, ...) that will be all handled by a SingleValueConverter.
- Standard Converters
- A list with a set of 6 objects of different types (like Properties, Color, Class, Method, ...) that will be all handled by a specialized converter processing nested XML elements.
- Reflection Converter
- A list with a set of 6 objects of different types (One, Five of the XStream benchmark package) that will be all handled by the ReflectionConverter.
- Serializable Converter
- A list with a set of 6 objects of different types (SerializableOne, SerializableFive of the XStream benchmark package) that will be all handled by the SerializableConverter.
- JavaBean Converter
- A list with a set of 6 objects of different types (OneBean, FiveBean of the XStream benchmark package) that will be all handled by the JavaBeanConverter. This converter has been registered especially for this two types.
The values above's unit is ms measured after 1000 unmarshalling operations with the object graphs described in the setup using XStream 1.4. The benchmark was run on an AMD Athlon with 2.1GHz running a JVM of Sun JDK 1.6.0_13 (32-bit) in Gentoo Linux. Note again, that these values are no replacement for real profiler results and they may vary from run to run for ~100ms due to this machine's background processes on a single CPU. However, it can give you some idea of what you can expect using different parser technologies.