RFR :7088419 : (L) Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32 and java.util.zip.Adler32
David Holmes
david.holmes at oracle.com
Fri May 17 02:15:00 UTC 2013
On 17/05/2013 11:58 AM, David Chase wrote:
>
> On 2013-05-16, at 9:26 PM, David Holmes <david.holmes at oracle.com> wrote:
>
>> Dave,
>>
>> This is certainly significant work!
>>
>> To get the mundane issues out of the way:
>> - C code uses indent of 2 in places instead of 4
>
> Are you referring to the #ifdefs and #defines?
> I just want to be sure, because that's what I see at 2 spaces.
No the C code:
JNIEXPORT jboolean JNICALL
Java_java_util_zip_CRC32_init(JNIEnv *env, jclass cls, jarray b,
jboolean use_clmul)
{
/* Get the CRC table from zip to initialize JNI. Our private copy
is missing if not compiled for fastcrc32. */
crc_table = get_crc_table();
jint *buf = (*env)->GetPrimitiveArrayCritical(env, b, 0);
if (buf) {
/* Don't know for sure how big an unsigned long is, therefore
copy one at a time. */
int i;
The above has indent 2 initially the moves to 8.
BTW while at this code I don't understand the issue with size of long
and copying "one at a time". Where are the "unsigned longs"? and should
we be using them if we don't even know they will be larger than unsigned
ints?
David
> David
>
More information about the core-libs-dev
mailing list