|
Authored by: cpeterson on Wednesday, May 16 2012 @ 02:50 PM EDT |
4. It was important to Bloch that rangeCheck be identical to code
in the Java platform so that it would throw the same exceptions and behave in
the same way as the Java code he copied. At his July 8, 2011 deposition, Mr.
Bloch testified that to provide the performance boost, it was necessary that
the rangeCheck that appears in Android be identical to Sun's Java
rangeCheck:
Q. So why would RangeCheck be the one that
requires the signature to be similar?
A. Because it is the only piece of
functionality that TimSort shares with the remainder of arrays,
java.util.arrays. TimSort is a 700 and -- you know, it's a big long file, and
the only functionality that it shares is this little function here, and it is
very much in the interest of the users of the new sort that it behave exactly
like the old sort. You want it to throw exactly the same exception. You want it
to actually emit the same prose. You want that text to be the same.
So,
you know, it's the one where it makes sense to do it. Everything else derives
from Tim Peters' implementation. And, you know, here is a little piece of the
interface that is specific to Java that doesn't exist in
C.
The fact that it's a ridiculous claim isn't
stopping anyone. Just think of it as roadway guard rails which make your
car go lots faster. [ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Wednesday, May 16 2012 @ 05:44 PM EDT |
well, at least oracle try to confuse everyone with strange
performance claims
with respect to timsort and
rangeCheck (see the other reply to your post
for example).
My main point was: to claim a function is important because
it is called 2600 times is ridiculous, when it (and every
other reasonable
equivalent implementation) does almost no
computational work (the estimated two
clock cycles average).[ Reply to This | Parent | # ]
|
|
|
|
|