<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Json serialization/deserialization faster than protocol buffers?</title>
	<atom:link href="http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/</link>
	<description></description>
	<lastBuildDate>Thu, 14 Jul 2011 17:33:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Falconi</title>
		<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/#comment-246</link>
		<dc:creator><![CDATA[Falconi]]></dc:creator>
		<pubDate>Sun, 23 Aug 2009 03:25:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.juma.me.uk/?p=91#comment-246</guid>
		<description><![CDATA[Hi, this is really nice post i like it so much
thank very much]]></description>
		<content:encoded><![CDATA[<p>Hi, this is really nice post i like it so much<br />
thank very much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cowtowncoder</title>
		<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/#comment-185</link>
		<dc:creator><![CDATA[Cowtowncoder]]></dc:creator>
		<pubDate>Thu, 02 Apr 2009 18:50:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.juma.me.uk/?p=91#comment-185</guid>
		<description><![CDATA[ByteArrayOutputStream.toByteArray() also does make a virgin copy. So I think it is doing about the same as what PB does in the end.
But if BAOS is re-created each time, it is doing allocations twice. This may be exactly what PB does too.

In the end though I agree in that it doesn&#039;t matter too much, either way, as long as BAOS is not created way too small (which it isn&#039;t with current test code).]]></description>
		<content:encoded><![CDATA[<p>ByteArrayOutputStream.toByteArray() also does make a virgin copy. So I think it is doing about the same as what PB does in the end.<br />
But if BAOS is re-created each time, it is doing allocations twice. This may be exactly what PB does too.</p>
<p>In the end though I agree in that it doesn&#8217;t matter too much, either way, as long as BAOS is not created way too small (which it isn&#8217;t with current test code).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eishay</title>
		<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/#comment-183</link>
		<dc:creator><![CDATA[Eishay]]></dc:creator>
		<pubDate>Wed, 01 Apr 2009 05:07:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.juma.me.uk/?p=91#comment-183</guid>
		<description><![CDATA[I saw it too, but it is not the same thing as reusing an existing memory block over and over (as you do in rest) instead of allocating new memory each time and throwing it to the gc (as protobuf toByteArray does). Not arguing about the efficiencies of the modern gc with young objects in eden etc, just saying it is not the same cpu/memory usage profile.]]></description>
		<content:encoded><![CDATA[<p>I saw it too, but it is not the same thing as reusing an existing memory block over and over (as you do in rest) instead of allocating new memory each time and throwing it to the gc (as protobuf toByteArray does). Not arguing about the efficiencies of the modern gc with young objects in eden etc, just saying it is not the same cpu/memory usage profile.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cowtowncoder</title>
		<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/#comment-182</link>
		<dc:creator><![CDATA[Cowtowncoder]]></dc:creator>
		<pubDate>Wed, 01 Apr 2009 01:28:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.juma.me.uk/?p=91#comment-182</guid>
		<description><![CDATA[Eishay: I wish I had seen comments earlier.
Please note that ByteArrayOutputStream.reset() is practically free: all it does it does it set pointer variable to 0. This is much cheaper than allocating a new stream.

I know that many other JDK classes do some cleanup, like ArrayList clearing up entries when size is set to 0. But BOS doesn&#039;t (I checked JDK sources to ensure that).

Of course, it probably does not make that much difference like you say, so maybe it&#039;s all irrelevant. :-)]]></description>
		<content:encoded><![CDATA[<p>Eishay: I wish I had seen comments earlier.<br />
Please note that ByteArrayOutputStream.reset() is practically free: all it does it does it set pointer variable to 0. This is much cheaper than allocating a new stream.</p>
<p>I know that many other JDK classes do some cleanup, like ArrayList clearing up entries when size is set to 0. But BOS doesn&#8217;t (I checked JDK sources to ensure that).</p>
<p>Of course, it probably does not make that much difference like you say, so maybe it&#8217;s all irrelevant. :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ismael Juma</title>
		<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/#comment-179</link>
		<dc:creator><![CDATA[Ismael Juma]]></dc:creator>
		<pubDate>Fri, 27 Mar 2009 09:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.juma.me.uk/?p=91#comment-179</guid>
		<description><![CDATA[I replied in &lt;a href=&quot;http://www.eishay.com/2009/03/benchmarking-is-tricky.html&quot; rel=&quot;nofollow&quot;&gt;Eishay&#039;s post&lt;/a&gt;.]]></description>
		<content:encoded><![CDATA[<p>I replied in <a href="http://www.eishay.com/2009/03/benchmarking-is-tricky.html" rel="nofollow">Eishay&#8217;s post</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eishay Smith</title>
		<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/#comment-178</link>
		<dc:creator><![CDATA[Eishay Smith]]></dc:creator>
		<pubDate>Thu, 26 Mar 2009 23:30:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.juma.me.uk/?p=91#comment-178</guid>
		<description><![CDATA[I changed the benchmarking to have the serializer create its own stream if it needs to. It doesn&#039;t make mush of a difference. The other thing I did was to create a new object to serialize every time (not reuse the same one). The latter dramatically reduce the performance of protobuf serialization. I&#039;ll write about it more once I&#039;ll have time. The code it checked in, if you have a chance please let me know if you think its fair for all serializers.]]></description>
		<content:encoded><![CDATA[<p>I changed the benchmarking to have the serializer create its own stream if it needs to. It doesn&#8217;t make mush of a difference. The other thing I did was to create a new object to serialize every time (not reuse the same one). The latter dramatically reduce the performance of protobuf serialization. I&#8217;ll write about it more once I&#8217;ll have time. The code it checked in, if you have a chance please let me know if you think its fair for all serializers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ismael Juma</title>
		<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/#comment-177</link>
		<dc:creator><![CDATA[Ismael Juma]]></dc:creator>
		<pubDate>Thu, 26 Mar 2009 19:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.juma.me.uk/?p=91#comment-177</guid>
		<description><![CDATA[Regarding the ByteArrayOutputStream.reset, I am not convinced that the latest change not to include it in the final time is correct.

In normal usage, you&#039;d have to reset it or create one, right? The fact that protocol buffers does this efficiently internally should be rewarded (or a similar approach should be used in the various serializers).

Ismael]]></description>
		<content:encoded><![CDATA[<p>Regarding the ByteArrayOutputStream.reset, I am not convinced that the latest change not to include it in the final time is correct.</p>
<p>In normal usage, you&#8217;d have to reset it or create one, right? The fact that protocol buffers does this efficiently internally should be rewarded (or a similar approach should be used in the various serializers).</p>
<p>Ismael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ismael Juma</title>
		<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/#comment-176</link>
		<dc:creator><![CDATA[Ismael Juma]]></dc:creator>
		<pubDate>Thu, 26 Mar 2009 19:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.juma.me.uk/?p=91#comment-176</guid>
		<description><![CDATA[Hi Eishay,

Interesting, I updated from SVN, but I get different results:

Object create,   Serialization, Deserialization
protobuf 302.05880, 209.97715, 244.49875
json(jackson) 141.42370, 225.06970, 344.70990

What JDK are you using? Also, are the results repeatable?

Ismael]]></description>
		<content:encoded><![CDATA[<p>Hi Eishay,</p>
<p>Interesting, I updated from SVN, but I get different results:</p>
<p>Object create,   Serialization, Deserialization<br />
protobuf 302.05880, 209.97715, 244.49875<br />
json(jackson) 141.42370, 225.06970, 344.70990</p>
<p>What JDK are you using? Also, are the results repeatable?</p>
<p>Ismael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eishay</title>
		<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/#comment-175</link>
		<dc:creator><![CDATA[Eishay]]></dc:creator>
		<pubDate>Thu, 26 Mar 2009 07:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.juma.me.uk/?p=91#comment-175</guid>
		<description><![CDATA[Hi,

I added the fix, but to be fair to the other serializors I also removed the ByteArrayOutputStream reset out of the time measurements. Here is a snippet from the results (didn&#039;t publish them yet):
  Object create,Serialization,Deserialization
protobuf       492.90000,325.60000,444.75000
json (jackson) 289.05000,324.55000,429.00000]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I added the fix, but to be fair to the other serializors I also removed the ByteArrayOutputStream reset out of the time measurements. Here is a snippet from the results (didn&#8217;t publish them yet):<br />
  Object create,Serialization,Deserialization<br />
protobuf       492.90000,325.60000,444.75000<br />
json (jackson) 289.05000,324.55000,429.00000</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eishay</title>
		<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/#comment-174</link>
		<dc:creator><![CDATA[Eishay]]></dc:creator>
		<pubDate>Thu, 26 Mar 2009 03:05:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.juma.me.uk/?p=91#comment-174</guid>
		<description><![CDATA[I was about to commit the fix when realizing that it may not by so fair to the other serializers. There is a hidden cost in the loop where we do ByteArrayOutputStream::reset(), I&#039;ll try to take it out of the equation.]]></description>
		<content:encoded><![CDATA[<p>I was about to commit the fix when realizing that it may not by so fair to the other serializers. There is a hidden cost in the loop where we do ByteArrayOutputStream::reset(), I&#8217;ll try to take it out of the equation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ismael Juma</title>
		<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/#comment-173</link>
		<dc:creator><![CDATA[Ismael Juma]]></dc:creator>
		<pubDate>Thu, 26 Mar 2009 00:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.juma.me.uk/?p=91#comment-173</guid>
		<description><![CDATA[Hi  Cowtowncoder,

Yes, I try to be a good open-source citizen. :) I had filed an issue with a patch earlier today:

http://code.google.com/p/thrift-protobuf-compare/issues/detail?id=2

Best,
Ismael]]></description>
		<content:encoded><![CDATA[<p>Hi  Cowtowncoder,</p>
<p>Yes, I try to be a good open-source citizen. :) I had filed an issue with a patch earlier today:</p>
<p><a href="http://code.google.com/p/thrift-protobuf-compare/issues/detail?id=2" rel="nofollow">http://code.google.com/p/thrift-protobuf-compare/issues/detail?id=2</a></p>
<p>Best,<br />
Ismael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cowtowncoder</title>
		<link>http://blog.juma.me.uk/2009/03/25/json-serializationdeserialization-faster-than-protocol-buffers/#comment-172</link>
		<dc:creator><![CDATA[Cowtowncoder]]></dc:creator>
		<pubDate>Wed, 25 Mar 2009 23:58:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.juma.me.uk/?p=91#comment-172</guid>
		<description><![CDATA[Hi there! You might want to contribute the PB patch to the benchmark project -- I think they&#039;d be happy to take it. That&#039;s how other codecs have been improved.]]></description>
		<content:encoded><![CDATA[<p>Hi there! You might want to contribute the PB patch to the benchmark project &#8212; I think they&#8217;d be happy to take it. That&#8217;s how other codecs have been improved.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

