Re: HashMap implementations and Integer specializations

2008-06-16 Thread charlie hunt
Martin, I'll accept your adding of the comment as a solution to my suggested improvement. charlie ... P.S. I sense you did not like my feedback / comments, or were somehow offended. I was trying to offer you a suggestion to improve to your test case. Martin Buchholz wrote: Charlie, Tes

Re: HashMap implementations and Integer specializations

2008-06-16 Thread charlie hunt
Martin, I'm rather shocked at your response! Consider for example, there's a very popular tool out their that integrates very well into NetBeans IDE and Eclipse IDE which suggests changing all 'new Integer(), new Long()' calls into 'Integer.valueOf() & Long.valueOf()'. Take a quick look at

Re: HashMap implementations and Integer specializations

2008-06-16 Thread charlie hunt
wrt the Integer & Long values you use in your test case ... You might consider using larger Integer & Long values, ones that lie outside the range of Integer.IntegerCache & Long.LongCache to avoid any potential confusion about whether the values you are putting into the Map might get grabbed f

Re: HashMap implementations and Integer specializations

2008-06-16 Thread Paul Hohensee
wrt ts-6434, the abstract just talked about performance case studies. We didn't know what the cases would be when we filed the abstract. Paul Martin Buchholz wrote: JavaOne 2008 technical session PDFs are now available http://developers.sun.com/learning/javaoneonline/j1online.jsp?track=javas

Re: HashMap implementations and Integer specializations

2008-06-09 Thread Martin Buchholz
Charlie, Test case code is different from regular code in that bad practice is often a good idea. People should know better than to "fix" test cases using their IDE. But I added this comment: // This code intentionally uses the denigrated constructors // that are guaranteed to re

Re: HashMap implementations and Integer specializations

2008-06-09 Thread Martin Buchholz
Charlie, Hotspot engineers throughout the ages have been tempted to optimize away object identity semantics of Integer and String, but I'm pretty sure that for e.g. new Integer(x) and new String(y) hotspot will certainly continue to return _new_ objects (unless of course the application can be pro

Re: HashMap implementations and Integer specializations

2008-06-09 Thread Martin Buchholz
Peter, Thanks. Fixed. Martin On Sun, Jun 8, 2008 at 10:59 PM, Peter Arrenbrecht <[EMAIL PROTECTED]> wrote: > Typo: testPutPreversesObjectIdentity > > On Mon, Jun 9, 2008 at 12:13 AM, Martin Buchholz <[EMAIL PROTECTED]> wrote: >> JavaOne 2008 technical session PDFs are now available >> >> http://

Re: HashMap implementations and Integer specializations

2008-06-08 Thread Peter Arrenbrecht
Typo: testPutPreversesObjectIdentity On Mon, Jun 9, 2008 at 12:13 AM, Martin Buchholz <[EMAIL PROTECTED]> wrote: > JavaOne 2008 technical session PDFs are now available > > http://developers.sun.com/learning/javaoneonline/j1online.jsp?track=javase&yr=2008 > > I was surprised to discover a discussi

Re: HashMap implementations and Integer specializations

2008-06-08 Thread Ismael Juma
Martin Buchholz <[EMAIL PROTECTED]> writes: > I was surprised to discover a discussion of > HashMap optimization at the JavaOne talk > http://developers.sun.com/learning/javaoneonline/2008/pdf/TS-6434.pdf > > Did I miss an announcement of that? I noticed a commit related to that a few weeks ago[1