Re: Porters: Performance suggestion

1998-11-30 Thread Juergen Kreileder
Gary> Does that mean the internals of arraycopy() look like this: Gary>for (int i=0; i < num_elements; i++) Gary> newArray[i] = oldArray[i]; No. arraycopy() is a native method but arraycopy(oldarray, 0, newarray, 0, num_elements) has the same effect has the above for-loop.

Re: Porters: Performance suggestion

1998-11-30 Thread Gary Mart \(GAM22\)
On Mon, Nov 30, 1998 at 11:08:09AM +0100, Ernst de Haan wrote: > Chris et all, > > > The Vector class uses an array. The JVM may not store the elements of > the array in sequential memory locations, but that is not an issue. The > programming interface is well-defined, and the internals of the

Re: Porters: Performance suggestion

1998-11-30 Thread Ernst de Haan
Chris et all, Chris Sommers wrote: > > Folks, > I believe that using arraycopy as shown below is not > guaranteed to work. One cannot assume that elements of a > Vector are stored in sequential memory locations, especially > as the Vector changes in size and memory is allocated in a > (possibly)

Re: Porters: Performance suggestion

1998-11-29 Thread Chris Sommers
Folks, I believe that using arraycopy as shown below is not guaranteed to work. One cannot assume that elements of a Vector are stored in sequential memory locations, especially as the Vector changes in size and memory is allocated in a (possibly) fragmented manner obver time. - chris Uncle Geor

Re: Porters: Performance suggestion

1998-11-26 Thread Ernst de Haan
Martin Sorgatz wrote: > > 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) > >

Re: Porters: Performance suggestion

1998-11-26 Thread Uncle George
technically we are to change only the platform dependent code - hands tied by license. Ur improvement would not fit into that catagory :( . PLEASE file away at javasoft. BTW this does not mean that it wont be used, or benefit those here. I have no problem with this being posted here gat Ernst de

Re: Porters: Performance suggestion

1998-11-26 Thread Martin Sorgatz
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; > w

Porters: Performance suggestion

1998-11-26 Thread Ernst de Haan
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) { anArra