Posts

Showing posts with the label boon

Boon JSON sersialization versus Kryo binary serialization versus Java Object Serialization

Boon JSON sersialization versus Kryo binary serialization versus Java Object Serialization Kryo vs. Boon v. Java Object Serialization Boon is not just a fast JSON parser, it happens to be one of the fastest ways to do Java Object Serialization period. Boon Java JSON serialization is faster than Java Object Serialization (ObjectOutputStream). It just happens to work with JSON. Kryo, a binary serializer which is the fastest way to serialize Java objects, wins by the way, but for large streams, Boon gets within 85% of Kryo. To get Java JSON serialization within 15% of the fastest Java Binary serializer took quite some effort. Boon JSON serialization is probably in the top five Java serializers for speed, and it is the fastest way to do JSON.?  Benchmark Mode Thr Count Sec Mean Mean error Units i.g.j.s.MainBoonSerializer.roundTripBig thrpt 16 6 1 101.078 12.809 ops/s i.g.j.s.MainJavaSerialization.roundTripBig thrpt 16 6 1 90.572 10.920 ops/s i.g.j.s.MainKryoJavaSerialization.roundTripB...

Boon 2x faster than Jackson at InputStream and not using index overlay

Boon 2x faster than Jackson at InputStream and not using index overlay Boon non-index overlay mode using inputstream 4 minutes ago  by  Richard Hightower This is with InputStream . According to Tatu comments InputStream is a use case that Boon could not compete in because boon is really just optimized for String. Tatu also said that Boon likely only wins because it uses index overlay. So here is a test that uses Boon without index overlay and uses  InputStream  not String. Benchmark Mode Thr Count Sec Mean Mean error Units MainBoonBenchmark.webxml thrpt 16 6 1 455347.925 46637.751 ops/s BoonClassicEagerNoLazyParse.webxml thrpt 16 6 1 401126.575 28331.138 ops/s JacksonASTBenchmark.webxml thrpt 16 6 1 233730.506 17868.136 ops/s MainJacksonObjectBenchmark.webxml thrpt 16 6 1 227287.992 21363.353 ops/s BoonReaderSource.webxml thrpt 16 6 1 216429.247 22538.238 ops/s BoonAsciiBenchMark.webxml thrpt 16 6 1 210416.450 10610.062 ops/s BoonUTF8BenchMark.webxml thrpt 16 6 1 19...

Boon JSON parser 1 7 MB JSON String against all competitors

Boon JSON parser 1 7 MB JSON String against all competitors Boon does not come with just one JSON parser. Boon comes with many, and now so does Groovy. There is the Boon JSON classic parser which does not use index overlay. Lets see how Boon and Groovy stack up to the competitors. This time I am going to throw in a few more of the Boon JSON parsers. This is parsing a 1.7 MB JSON string. Why didnt I cover each type of parser in the last benchmark....  Because it is boring. I just picked the best one for the benchmark. But there are parsers that are geared toward certain use cases.  Operations per second. Benchmark                                           Mode   Thr     Count  Sec    Mean        Mean error     StatelessBoonBenchMark.citmCatalog              ...

Boon JSON Custom object serializer now works with super classes and interfaces Example of using Guava HashCode

Boon JSON Custom object serializer now works with super classes and interfaces Example of using Guava HashCode related to https://github.com/RichardHightower/boon/issues/242 https://github.com/RichardHightower/boon/issues/231 Boon JSON: Custom object serializer works with super classes, and interfaces (and example of using HashCodeGuava).  Lets say you want to write a custom object serializer to work with Guava HashCode thingy or whatever else you need. public static String toJson ( Object obj ) { return createSerializer (). serialize ( obj ). toString (); } private static JsonSerializer createSerializer () { JsonSerializerFactory factory = new JsonSerializerFactory () . addTypeSerializer ( HashCode . class , new HashCodeSerializer () ); return factory . create (); } private static class HashCodeSerializer implements CustomObjectSerializer < HashCode > { @Override public Class < HashCode > type () { return HashCode . class ; } @...