Re: System.arrayCopy Vs array clone
- From: mei <mei@xxxxxx>
- Date: Wed, 28 Feb 2007 19:58:40 +0100
Hello Arne,
Arne Vajhøj a écrit :
It probably depend on Java vendor, platform and version.
Meaning that there are a few hundred possible results.
There are absolutely no guarantee that IBM Java 1.3.1 on AIX PPC
will have same characteristics as SUN Java 1.5.0 on Win32 x86.
True. I'm using Java 1.5 and win32 x86.
J. Bloch were using Java 1.3 and win32 x86.
However he didn't say explicitly that he ran such benchmark by himself for this matter. His expression was: "Because of its many shortcomings, some expert programmers simply choose never to override the clone method and never to invoke it except, perhaps, to copy arrays cheaply".
That said then my expectation will be that:
- the difference is small because they basically do the same thing
Hmmm... Clone() entails the navigation through the inheritance hierarchy to finally invoke Object.clone(), then by a mechanism I ignore the details provide an instance of the correct type.
- extremely few real world applications will be effected by the.
difference
Arne
- References:
- System.arrayCopy Vs array clone
- From: mei
- Re: System.arrayCopy Vs array clone
- From: Arne Vajhøj
- System.arrayCopy Vs array clone
- Prev by Date: 3d solar system.
- Next by Date: Re: need java trainer
- Previous by thread: Re: System.arrayCopy Vs array clone
- Next by thread: [security] window of vulnerability
- Index(es):
Relevant Pages
|
|