RameshRaj / thrift-protobuf-compare

Automatically exported from code.google.com/p/thrift-protobuf-compare
0 stars 0 forks source link

KryoOptimizedSerializer makes unfair optimizations? #20

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I was looking through the code for KryoOptimizedSerializer and it looks
like it's making unfair optimizations by specializing things for the exact
data value used in the benchmark.  For example, it sets
Image.fieldsCanBeNull(false) simply because in the benchmark the fields of
Image are never null.

Conversely, I think the regular KyroSerializer could be sped up by telling
it about the fields that actually can never be null (Image.uri, Media.uri,
etc).

I tried making a configuration of the Kryo serializer that only used fair
optimizations.  It's attached.  (I don't really know Kryo, so I may have
done things incorrectly.)

Original issue reported on code.google.com by kannan%c...@gtempaccount.com on 22 Feb 2010 at 3:45

Attachments: