Thanks Aleksey! I think my patch is a general solution for this case and has no dependency on any optimized feature of J9 VM : ) 2009/1/8 Aleksey Shipilev <[email protected]>
> That's awesome, Jim! > Thanks for coming in :) > > However, you seem to be missing the point. I was talking about > refactoring Kevin's patch to fit the stated requirements. This is > merely because Kevin claim the patch already gives the boost for > SPECjbb2005. Kevin already has the specialized conversion in > String(String, int) private constructor. > > Nevertheless, your specialized version looks good with regards to > performance numbers, we need to test what's better for radix-10 > conversion: Jim's version or Kevin's one now. > > Thanks a lot, > Aleksey. > > On Thu, Jan 8, 2009 at 12:11 PM, Jim Yu <[email protected]> wrote: > > Hi Aleksey, > > I very agree with you and I have implemented an optimized algorithm for > > Integer.toString(int) method. Thanks to your benchmark, here are the test > > results[1] on my windows platform. I've raised a JIRA at > > https://issues.apache.org/jira/browse/HARMONY-6068 > > [1] > > Result for Harmony java6 branch: > > (String)base + (int)add: > > ------------------------------------------- > > base length (vars with rows): 0..2..10 > > add length (vars with cols): 0..2..10 > > > > loop duration = 100 msecs > > target variance = 0.05 > > > > ops/msec, the more the better: > > 6721, 6096, *4650, *3846, *3178, > > *8080, *5833, *4447, 3731, 3048, > > *7985, *5848, 4788, 3727, *3114, > > *7891, 5592, *4389, *3560, 3048, > > 8388, 5607, *4522, 3727, 3051, > > > > After applied my patch: > > (String)base + (int)add: > > ------------------------------------------- > > base length (vars with rows): 0..2..10 > > add length (vars with cols): 0..2..10 > > > > loop duration = 100 msecs > > target variance = 0.05 > > > > ops/msec, the more the better: > > 8322, 6721, 4791, 4788, 4788, > > 8388, 6721, 5156, *5012, 4797, > > 8388, 6707, 5161, *4963, 4795, > > 8388, 6707, *5126, 4802, 4788, > > *8048, 6700, *5021, 4802, *4687, > > > > 2009/1/7 Aleksey Shipilev <[email protected]> > > > >> Ok, we can implement the in-place Integer.toString() and specialize > >> the radix-10 conversion in Integer. Then Classlib performance guys > >> might use the inplace conversion to optimize StringBuilder performance > >> or even catch the concatenation like J9 does. > >> > >> My idea is to share whatever optimization between all VMs that use the > >> Classlib. > >> > >> Thanks, > >> Aleksey. > >> > >> On Wed, Jan 7, 2009 at 5:46 PM, Tim Ellison <[email protected]> > wrote: > >> > Aleksey Shipilev wrote: > >> >> Am I understanding right that private String(String, int) is inlined > >> >> by J9 JIT when (String)s1 + (int)v1 is required? > >> > > >> > Yes - so for DRLVM, Kevin's patch in HARMONY-6056 will be impotent. > >> > > >> > Regards, > >> > Tim > >> > > >> > > >> > > > > > > > > -- > > Best Regards, > > Jim, Jun Jie Yu > > > > China Software Development Lab, IBM > > > -- Best Regards, Jim, Jun Jie Yu China Software Development Lab, IBM
