Loop compilation weirdness
Scott Oaks
Scott.Oaks at Sun.COM
Wed Dec 3 14:34:56 PST 2008
Thanks; that makes sense. A little counter-intuitive to me that the
far-simpler-to-write code isn't the simpler code to execute, but now I
see the point about branching out of the loop vs. merging back in.
> P.S. The System.arraycopy intrinsic is heavily optimized, and in some
> cases is faster than a hand-written loop.
Always faster (or at least as fast), I would expect (and I've filed bugs
on that in the past...). But this isn't a simple array copy; it's type
converting as it goes.
-Scott
More information about the hotspot-dev
mailing list