<?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"
	>
<channel>
	<title>Comments on: Beware using enum constants as Map keys in performance-sensitive code.</title>
	<atom:link href="http://blog.uncommons.org/2006/12/17/beware-using-enum-constants-as-map-keys-in-performance-sensitive-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.uncommons.org/2006/12/17/beware-using-enum-constants-as-map-keys-in-performance-sensitive-code/</link>
	<description>Rants and opinion interspersed with awe-inspiring tales of heoric software engineering endeavours.</description>
	<pubDate>Wed, 19 Nov 2008 14:16:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Anjan Bacchu</title>
		<link>http://blog.uncommons.org/2006/12/17/beware-using-enum-constants-as-map-keys-in-performance-sensitive-code/#comment-7</link>
		<dc:creator>Anjan Bacchu</dc:creator>
		<pubDate>Tue, 15 May 2007 03:38:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uncommons.org/?p=6#comment-7</guid>
		<description>hi there,

  I actually did exactly the same "mistake" but did NOT notice any big performance change. This was for a swing app -- the reason I did that was to make a LARGE if () else if () block more readable(by making it a switch/case) block.

  Also, almost immediately, I replaced with EnumMap -- probably that was the reason why I(nor the users/testers) we did not notice a big performance change.

  Unfortunately, I don't have that code with me as of now and I will have to ask my ex colleagues to investigate it.

  Can you specify which version of java u used ?

BR,
~A</description>
		<content:encoded><![CDATA[<p>hi there,</p>
<p>  I actually did exactly the same &#8220;mistake&#8221; but did NOT notice any big performance change. This was for a swing app &#8212; the reason I did that was to make a LARGE if () else if () block more readable(by making it a switch/case) block.</p>
<p>  Also, almost immediately, I replaced with EnumMap &#8212; probably that was the reason why I(nor the users/testers) we did not notice a big performance change.</p>
<p>  Unfortunately, I don&#8217;t have that code with me as of now and I will have to ask my ex colleagues to investigate it.</p>
<p>  Can you specify which version of java u used ?</p>
<p>BR,<br />
~A</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://blog.uncommons.org/2006/12/17/beware-using-enum-constants-as-map-keys-in-performance-sensitive-code/#comment-5</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 14 May 2007 17:56:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uncommons.org/?p=6#comment-5</guid>
		<description>Definitely, that occurred to me after I originally posted this.  The hashcode() performance is still poor, it's just not such a problem if you use EnumMap.</description>
		<content:encoded><![CDATA[<p>Definitely, that occurred to me after I originally posted this.  The hashcode() performance is still poor, it&#8217;s just not such a problem if you use EnumMap.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aviad Ben Dov</title>
		<link>http://blog.uncommons.org/2006/12/17/beware-using-enum-constants-as-map-keys-in-performance-sensitive-code/#comment-3</link>
		<dc:creator>Aviad Ben Dov</dc:creator>
		<pubDate>Mon, 14 May 2007 15:06:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uncommons.org/?p=6#comment-3</guid>
		<description>Why not use the &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/EnumMap.html" rel="nofollow"&gt;EnumMap&lt;/a&gt;? It promises better performance than the regular HashMap by using the ordinal value and an underlying array.</description>
		<content:encoded><![CDATA[<p>Why not use the <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/EnumMap.html" rel="nofollow">EnumMap</a>? It promises better performance than the regular HashMap by using the ordinal value and an underlying array.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.206 seconds -->
