Ernst de Haan wrote:

> Small performance enhancement suggested.
>
> The performance of java.util.Vector.copyInto(Object[]) could be
> improved, I believe. Currently the implementation does something like:
>
>    public void copyInto(Object[] anArray)
>    {
>       int i = elementCount;
>       while (i-- > 0)
>       {
>          anArray[i] = elementData[i];
>       }
>    }
>
> Why not make it:
>
>    public void copyInto(Object[] anArray)
>    {
>       System.arraycopy(elementData, 0, anArray, 0, elementData.length);
>    }
>
> I personally use the copyInto method very often.

If you want a performance improvement you should not copy
elementData.length
elements but just elementCount elements ;-)

> Is this the place I should post such issues, or should I contact
> JavaSoft or so?

I don't know (I'm not a porter). Why not build your own classes.zip?

--
Martin Sorgatz
[EMAIL PROTECTED]

Reply via email to