<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Performance Within Reach &#187; JavaOne</title>
	<atom:link href="http://unmanageability.com/index.php/category/javaone/feed/" rel="self" type="application/rss+xml" />
	<link>http://unmanageability.com</link>
	<description>Performance Within Reach</description>
	<lastBuildDate>Sat, 17 Jul 2010 19:19:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>(edited) JavaOne talk on performance myths</title>
		<link>http://unmanageability.com/index.php/2005/07/12/javaone-talk-on-performance-myths/</link>
		<comments>http://unmanageability.com/index.php/2005/07/12/javaone-talk-on-performance-myths/#comments</comments>
		<pubDate>Tue, 12 Jul 2005 07:27:58 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaOne]]></category>

		<guid isPermaLink="false">http://codeperformance.com/index.php/2005/07/07/javaone-talk-on-performance-myths/</guid>
		<description><![CDATA[Notes from the Azul Systems&#8217; (presented by Cliff Click) talk.
Java Performance Myths.
[In response to the comment about the original notes being a little too scant, I've decided to edit this entry. Sun will provide audio &#038; slides, which I will link to once available.]
. I heard (or googled) that making fields or methods final (or private) will help performance (or it will allow more inlining).
&#8230;Wrong. With or without &#8216;final&#8217; every inlinable methods is inlined by the runtime compilers.
. I heard ...]]></description>
			<content:encoded><![CDATA[<p><strong>Notes from the Azul Systems&#8217; (presented by Cliff Click) talk.</strong></p>
<p><strong>Java Performance Myths.</strong></p>
<p><em>[In response to the comment about the original notes being a little too scant, I've decided to edit this entry. Sun will provide audio &#038; slides, which I will link to once available.]</em></p>
<p>. <strong>I heard (or googled) that making fields or methods final (or private) will help performance (or it will allow more inlining).</strong><br />
&#8230;Wrong. With or without &#8216;final&#8217; every inlinable methods is inlined by the runtime compilers.</p>
<p>. <strong>I heard (or googled) that try/catch block are free (or very expensive).</strong><br />
&#8230;The reality is &#8212; it depends, in general try to<em> avoid try/catch blocks in tight loops</em>. Don&#8217;t use exceptions to end loops, or for null checking on say list traversal. You&#8217;d be defeating JIT optimizations, and duplicating the automatic range check. </p>
<p>. <strong>I heard (or googled) that using RTTI is better than  instance_of (and/or better than v-call (virtual call))</strong><br />
&#8230;RTTI (Runtime Type Information &#8211;google for samples) is an ugly hack from c++, don&#8217;t do it unless you need to squeeze the last 10% of perf. improvement. RTTI wins but it&#8217;s too ugly (in the OO sense). Use v-call if you can.<br />
&#8230;v-call is more expensive in Hotspot than other VMs, Hotspot implements better subtype checking (efficent switch).<br />
&#8230;The bottom line is runtime compilers are optimized for the common patterns of coding out there, so stick to clean design/coding, use OO principles.<br />
<code><br />
<strong>v-call</strong> :  v_call(); // dynamic dispatch here<br />
<strong>instance_of:</strong><br />
if( this instanceof Child1 )<br />
((Child1)this).non_v_call();<br />
<strong>RTTI</strong>: switch( _rtti ) { case 1: // hand-inline Child1 specific ...<br />
</code></p>
<p>. <strong>Should I avoid synchronization at <em>all </em> cost? </strong><br />
&#8230;The average system today spends 55-110 ns doing uncontented lock/unlock operations, so it&#8217;s not free but not terribly expensive either.<br />
&#8230;Hotspot&#8217;s synchronization operations on Xeons are apparently slow (~275 cycles), IBM/BEA/Azul are much better at it.<br />
&#8230;For light contention situations, BEA outperforms the other VMs, Sun performs poorly.<br />
&#8230;In general, <em>synchronization is better than bugs</em>! (especially now that&#8217;s we&#8217;re in the multi-core era). So beware of the costs (and profile if you can) and try to use the new concurrency API in 1.5 but don&#8217;t avoid them as threading bugs like race conditions are notoriously hard to fix. Think more about your algorithm.</p>
<p>. <strong>I heard (or googled) that I should use object pools say to help the garbage collector, or should I reuse objects or create new ones and assume that the GC is smart enough to efficently take care of the cleanup?</strong><br />
&#8230;It depends on cost of initialization of the object and the turnover rates. Don&#8217;t do it for small objects, but it may be a possible win for large ones or those with heavy initalization cost (JPanel?). As always, profile &#8212; use JConsole or VisualGC.<br />
&#8230;Don&#8217;t pool objects like Hashtables.</p>
<p>. <strong>How much of a performance impact the 5.0 features have on Java code?</strong><br />
&#8230;The foreach construct and autoboxing are FREE! (no additional cost incurred). They&#8217;re <a href="http://catb.org/~esr/jargon/html/S/syntactic-sugar.html">syntactic sugar</a>.<br />
&#8230;Note that enums on Xeon with Sun&#8217;s Hotspot has issues (more on this in a later post, but it&#8217;s when iterating over enums).</p>
<p>.<strong>Other predictions/advice</strong><br />
&#8230;Pause times are going down, GCs are getting more  efficient. <em>Concurrent GC will be the default </em>in most VMs in the coming years, so if possible use them now!<br />
&#8230;<a href="http://www.cag.lcs.mit.edu/~rinard/paper/oopsla99.pdf">Escape analysis</a> (optimization that can be performed to improve storage allocation and reclamation of objects) is being integrated into VMs, one less reason to pool objects.<br />
&#8230;<em>Locking is getting cheaper</em> but multi-cores will make it more expensive, a <a href="http://www-128.ibm.com/developerworks/java/library/j-jtp11234/">CAS </a>instruction on x86 takes ~200+ cycles.</p>
<p class="credits">Technorati Tags: <a href="http://www.technorati.com/tag/javaone" rel="tag">JavaOne</a> | <a href="http://technorati.com/tag/CodePerformance" rel="tag">CodePerformance</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://unmanageability.com/index.php/2005/07/12/javaone-talk-on-performance-myths/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Hans Boehm&#8217;s talk on Finalizers and Synchronization</title>
		<link>http://unmanageability.com/index.php/2005/07/02/hans-boehm/</link>
		<comments>http://unmanageability.com/index.php/2005/07/02/hans-boehm/#comments</comments>
		<pubDate>Sat, 02 Jul 2005 01:58:51 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
				<category><![CDATA[JavaOne]]></category>

		<guid isPermaLink="false">http://codeperformance.com/index.php/2005/06/30/hans-boehm/</guid>
		<description><![CDATA[
 
 
 
  Hans Boehm
  
  Originally uploaded by code performance.
 

Interesting talk by Hans Boehm on Finalization and the JMM. It was mostly a repeat of his presentation at POPL03, that you can find here.

]]></description>
			<content:encoded><![CDATA[<div style="float: right; margin-left: 10px; margin-bottom: 10px;">
 <a href="http://www.flickr.com/photos/83504529@N00/22341559/" title="photo sharing"><img src="http://static.flickr.com/17/22341559_0ac4a5bd76.jpg?v=0" alt="" style="border: solid 2px #000000;" width="150" height="200" /></a><br />
 <br />
 <span style="font-size: 0.9em; margin-top: 0px;"><br />
  <a href="http://www.flickr.com/photos/83504529@N00/22341559/">Hans Boehm</a><br />
  <br />
  Originally uploaded by <a href="http://www.flickr.com/people/83504529@N00/">code performance</a>.<br />
 </span>
</div>
<p>Interesting talk by Hans Boehm on Finalization and the JMM. It was mostly a repeat of his presentation at POPL03, that you can find <a href="http://www.hpl.hp.com/personal/Hans_Boehm/popl03/web/">here</a>.<br />
<br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://unmanageability.com/index.php/2005/07/02/hans-boehm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Live from JavaOne &#8217;05 &#8212; day 0</title>
		<link>http://unmanageability.com/index.php/2005/06/27/live-from-javaone-05-day-0/</link>
		<comments>http://unmanageability.com/index.php/2005/06/27/live-from-javaone-05-day-0/#comments</comments>
		<pubDate>Mon, 27 Jun 2005 00:36:01 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaOne]]></category>

		<guid isPermaLink="false">http://codeperformance.com/index.php/2005/06/27/live-from-javaone-05-day-0/</guid>
		<description><![CDATA[Just came back from the Netbeans day where Tim Cramer, Tim Lindholm, Bob Brewin, Graham Hamilton and Tim Bray talked about building a community around NetBeans, with SE, ME, EE and XML. The message is clear there is no other IDE more open than Netbeans. Cramer mentioned he was working with Kaffe folks in Brazil for them to be able to deploy apps from within Netbeans. Coyote was mentioned also as another example of how not just Netbeans but also SE is opening up to other non-Java languages. Hamilton said they'll be enhancing the bytecode in Dolphin (aka Java 7) to ease support for scripting languages.  ]]></description>
			<content:encoded><![CDATA[<p>Just came back from the Netbeans day where Tim Cramer, Tim Lindholm, Bob Brewin, Graham Hamilton and Tim Bray talked about building a community around NetBeans, with SE, ME, EE and XML. Sun&#8217;s message is clear, there is no other IDE more open than Netbeans today.  </p>
<p>Cramer mentioned he was working with Kaffe folks in Brazil for them to be able to deploy apps from within Netbeans. Coyote was mentioned also as another example of how not just Netbeans but also SE is opening up to other non-Java languages. Hamilton said they&#8217;ll be enhancing the Java bytecode in Dolphin (aka Java 7) to ease support for scripting languages.  </p>
<p>Sun seems impressed by the turnout, rooms were pretty crowded&#8230; </p>
<p><a href="http://technorati.com/tag/CodePerformance" rel="tag">CodePerformance</a> | <a href="http://www.technorati.com/tag/javaone" rel="tag">JavaOne</a></p>
]]></content:encoded>
			<wfw:commentRss>http://unmanageability.com/index.php/2005/06/27/live-from-javaone-05-day-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who&#8217;s presenting at JavaOne?</title>
		<link>http://unmanageability.com/index.php/2005/05/15/whos-presenting-at-javaone/</link>
		<comments>http://unmanageability.com/index.php/2005/05/15/whos-presenting-at-javaone/#comments</comments>
		<pubDate>Sun, 15 May 2005 09:47:33 +0000</pubDate>
		<dc:creator>coder</dc:creator>
				<category><![CDATA[JavaOne]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://codeperformance.com/index.php/2005/05/15/whos-presenting-at-javaone/</guid>
		<description><![CDATA[This year they&#8217;re having 318 BOFs and Sessions in 8 different Tracks&#8230;
BEA &#8212; 26 talks: 13 BOFs, 13 Sessions
Google &#8212; 2 talks: 1 BOF, 1 Session
IBM &#8212; No talks???
Sun &#8212; 144 Talks: 71 BOFs, 73 Sessions
Oracle &#8212; 16 Talks: 5 BOFs, 11 Sessions
Nokia &#8212; 11 Talks: 7 BOFs, 4 Sessions
HP &#8212; 2 talks: 1 BOF, 2 Sessions
SAP &#8212; 2 talks: 1 BOF, 1 Session
Motorola &#8212; 5 talks: 2 BOFs, 3 Sessions
JBoss &#8212; 6 Talks: 1 BOF, 5 Sessions
Interface21 &#8212; 2 ...]]></description>
			<content:encoded><![CDATA[<p>This year they&#8217;re having 318 BOFs and Sessions in 8 different Tracks&#8230;</p>
<p>BEA &#8212; 26 talks: 13 BOFs, 13 Sessions<br />
Google &#8212; 2 talks: 1 BOF, 1 Session<br />
IBM &#8212; No talks???<br />
Sun &#8212; 144 Talks: 71 BOFs, 73 Sessions<br />
Oracle &#8212; 16 Talks: 5 BOFs, 11 Sessions<br />
Nokia &#8212; 11 Talks: 7 BOFs, 4 Sessions<br />
HP &#8212; 2 talks: 1 BOF, 2 Sessions<br />
SAP &#8212; 2 talks: 1 BOF, 1 Session<br />
Motorola &#8212; 5 talks: 2 BOFs, 3 Sessions<br />
JBoss &#8212; 6 Talks: 1 BOF, 5 Sessions<br />
Interface21 &#8212; 2 talks: 2 Sessions</p>
<p>15 Talks about or related to NetBeans: 10 Sessions, 5 BOFs<br />
6 Talks about or related to Eclipse: 2 BOFs, 4 Sessions</p>
<p>Other interesting tidbits:</p>
<p>Talks&#8211;<br />
. Hans Bohem: <a href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=270281&#038;ilocation_id=93-&#038;ilanguage=english">Finalization, Threads, and the Javaâ„¢ Technology Memory Model</a><br />
. Arthur Van Hoff: Tahiti:<a href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=271105&#038;ilocation_id=93-1&#038;ilanguage=english"> Designing for the TiVo Platform</a>, <a href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=271108&#038;ilocation_id=93-1&#038;ilanguage=english">Interactive Media Applications Around the Home</a><br />
. Azul Systems will be giving 3 Sessions.<br />
  . <a href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=270268&#038;ilocation_id=93-1&#038;ilanguage=english">Performance Myths Exposed</a>.<br />
     . <em>&#8220;&#8230;We compare tweaked and untweaked code on a wide range of modern Java Virtual Machines (JVM machines) to see what makes Java technology run faster&#8230;. nearly all performance tweaks from five years ago are now strictly counterproductive. &#8220;</em><br />
  . <a href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=271429&#038;ilocation_id=93-1&#038;ilanguage=english">Speculative Locking: Breaking the Scale Barrier</a><br />
     . <em>&#8220;&#8230; Speculative Locking allows many threads to speculatively execute at the same time into a locked region. Only threads that actually hit data contention will need to roll back and retry.&#8221;</em><br />
  . <a href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=271410&#038;ilocation_id=93-1&#038;ilanguage=english">Network Attached Processing: Tapping 384-Way SMP, 256GB Javaâ„¢ Technology Compute Bricks</a><br />
     . <em>&#8220;&#8230; network attached processing, a fundamentally new model for delivering massive amounts of compute power to Javaâ„¢ technology-based applications running on existing server hardware, operating systems, and middleware platforms&#8221;</em></p>
<p class="credits">Technorati Tags:  <a href="http://www.technorati.com/tag/javaone" rel="tag">JavaOne</a>  | <a href="http://technorati.com/tag/CodePerformance" rel="tag">CodePerformance</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://unmanageability.com/index.php/2005/05/15/whos-presenting-at-javaone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSFT @ JavaOne 2005</title>
		<link>http://unmanageability.com/index.php/2005/05/15/msft-javaone-2005/</link>
		<comments>http://unmanageability.com/index.php/2005/05/15/msft-javaone-2005/#comments</comments>
		<pubDate>Sun, 15 May 2005 08:53:07 +0000</pubDate>
		<dc:creator>coder</dc:creator>
				<category><![CDATA[JavaOne]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://codeperformance.com/index.php/2005/05/15/msft-javaone-2005/</guid>
		<description><![CDATA[&#8220;I, Microsoft, take you, Sun, to be my partner,
loving what I know of you, and trusting what I do not yet know.
I eagerly anticipate the chance to be as admired as you were,
getting to know the force you had become,
and falling in love a little more every day.
I promise to interop, interop and interop with you
through whatever life may bring us.&#8221;
  2005 will mark the return of  Microsoft to JavaOne though  they did send a few employees ...]]></description>
			<content:encoded><![CDATA[<p>&#8220;I, Microsoft, take you, Sun, to be my partner,<br />
loving what I know of you, and trusting what I do not yet know.<br />
I eagerly anticipate the chance to be as admired as you were,<br />
getting to know the force you had become,<br />
and falling in love a little more every day.<br />
I promise to interop, interop and interop with you<br />
through whatever life may bring us.&#8221;</p>
<p>  2005 will mark the <em>return </em>of  Microsoft to JavaOne though  they did send a few employees at attend last year, this year as Sun CEO Scott McNealy announced on Friday (13th of May) not only are they a &#8220;<em><strong>major</strong></em>&#8221; sponsor but they&#8217;re also presenting sessions and BOFs.</p>
<p>Their talks:</p>
<p><a href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=270950&#038;ilocation_id=93-1&#038;ilanguage=english">BOF-9095 	On the Couch With Sun and Microsoft   </a><br />
Ray Lai, Sun Microsystems; <em><a href="http://www.simonguest.com/">Simon Guest</a></em>, Microsoft Corporation; Marina Fisher, Sun Microsystems; Laurence Moroney, Philotic Software Solutions; <em>Dino Chiesa</em>, Microsoft Corporation; <em><a href="http://www.douglasp.com/default.aspx">Doug Purdy</a></em>, Microsoft Corporation</p>
<p><a href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=270854&#038;ilocation_id=93-1&#038;ilanguage=english">BOF-9854 	Systems Management Using Web Services and WS-Management  </a><br />
Akhil Arora, Sun Microsystems; <em>Josh Cohen</em>, Microsoft Corporation</p>
<p><a href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=271367&#038;ilocation_id=93-1&#038;ilanguage=english">TS-3367 	Interoperability Between Javaâ„¢ Technology and .NET: More Than Just Web Services </a><br />
<em>Kevin Wittkopf</em>, Microsoft; Wayne Citrin, JNBridge, LLC</p>
<p><a href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=272530&#038;ilocation_id=93-1&#038;ilanguage=english">TS-3552 	Javaâ„¢ Technology and .NET Interoperability Using WS-* Web Services Architecture </a><br />
<em><a href="http://blogs.sun.com/roller/page/brewin">Robert Brewin</a></em>, Sun Microsystems; <a href="http://www.javapolis.com/confluence/display/JP04/Mark+Hapner">Mark Hapner</a>, Sun Microsystems, Inc.; <em><a href="http://www.xml.com/pub/au/49">Andrew Layman</a></em>, Microsoft Corporation</p>
<p><a href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=272543&#038;ilocation_id=93-1&#038;ilanguage=english">TS-3553 	Javaâ„¢ and .NET: Interoperability Challenges and Rewards </a><br />
<a href="http://www.mnot.net/personal/">Mark Nottingham</a>, BEA Systems, Inc.; <a href="http://weblogs.java.net/blog/pelegri/">Eduardo Pelegri-Llopart</a>, Sun Microsystems, Inc; <em><a href="http://c2.com/cgi/wiki?DinoChiesa">Dino Chiesa</a></em>, Microsoft Corporation; <a href="http://searchwebservices.techtarget.com/ateExpertBio/0,289623,sid26_cid446608,00.html">Anne Thomas Manes</a>, Burton Group; <a href="http://www.pocketsoap.com/">Simon Fell</a>, Salesforce.com; William Henry, IONA Technologies</p>
<p><a href="https://www28.cplan.com/javaone05_93_1/session_details.jsp?isid=269866&#038;ilocation_id=93-1&#038;ilanguage=english">TS-9866 	Advanced Web Services Interoperability </a><br />
<em><a href="http://www.simonguest.com/">Simon Guest</a></em>, Microsoft Corporation; <a href="http://developers.sun.com/events/techdays/speakers/index.html">Raghavan Srinivas</a>, Sun Microsystems</p>
<p class="credits">Technorati Tags: <a href="http://www.technorati.com/tag/javaone" rel="tag">JavaOne</a> | <a href="http://technorati.com/tag/CodePerformance" rel="tag">CodePerformance</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://unmanageability.com/index.php/2005/05/15/msft-javaone-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
