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.

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

Ernst
-- 
 _________________________________________________________
|  "Come to me all you who are weary and burdened, and I  |
|                  will give you rest."                   |
|                                                         |
|                             -- Jesus Christ (Mt. 11:28) |
|_______________________ _________________________________|
| Ernst de Haan         | email [EMAIL PROTECTED]    |
| Java programmer       | web   members.xoom.com/znerd/   |
| Utrecht University    | icq#  21871778                  |
|_______________________|_________________________________|

Reply via email to