RFR [8014066] Mistake in documentation of ArrayList#removeRange (original) (raw)
Martin Buchholz martinrb at google.com
Wed Mar 19 22:32:41 UTC 2014
- Previous message: RFR [8014066] Mistake in documentation of ArrayList#removeRange
- Next message: RFR [8014066] Mistake in documentation of ArrayList#removeRange
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
No one is as performance obsessed as Ulf. In this case, because it's specified to throw, and because it's a bulk operation, let's try hard not to care about the wasted nanoseconds.
On Wed, Mar 19, 2014 at 3:02 PM, Ulf Zibis <Ulf.Zibis at cosoco.de> wrote:
Am 19.03.2014 09:19, schrieb Ivan Gerasimov:
Thank you Ulf!
On 19.03.2014 2:12, Ulf Zibis wrote:
Am 18.03.2014 19:28, schrieb Ivan Gerasimov:
Assuming this last iteration is OK, should the next step be a CCC request? Do you mean? : /* * ... + * It is assumed that fromIndex <= toIndex, otherwise the behaviour_ _of this method is undefined._ _* ..._ _- * toIndex < fromIndex})_ _* ..._ _*/_ _protected void removeRange(int fromIndex, int toIndex) {_ _..._ _The (fromIndex > toIndex) condition is checked now, so the behavior of the method is defined - it throws an exception. Because Martin stated some days ago, that it normally should not occur, that removeRange is invoked with toIndex < fromIndex, and checking this again unnecessarily decreases performance a little, I was hoping, your "next CCC step" would be to drop this check. -Ulf
- Previous message: RFR [8014066] Mistake in documentation of ArrayList#removeRange
- Next message: RFR [8014066] Mistake in documentation of ArrayList#removeRange
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]