Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 59021 invoked from network); 3 Sep 2004 05:17:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Sep 2004 05:17:56 -0000 Received: (qmail 40576 invoked by uid 500); 3 Sep 2004 05:17:56 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 40426 invoked by uid 500); 3 Sep 2004 05:17:55 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: "Derby Development" Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 40415 invoked by uid 99); 3 Sep 2004 05:17:55 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [62.24.64.34] (HELO smtp.dkm.cz) (62.24.64.34) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 02 Sep 2004 22:17:54 -0700 Received: (qmail 85344 invoked by uid 0); 3 Sep 2004 05:17:51 -0000 Received: from lin.code.cz (HELO ?192.168.0.2?) (62.245.69.249) by smtp.dkm.cz with SMTP; 3 Sep 2004 05:17:51 -0000 Message-ID: <4137FED3.2070202@code.cz> Date: Fri, 03 Sep 2004 07:19:15 +0200 From: =?ISO-8859-1?Q?Jan_Hlavat=FD?= User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Development Subject: Re: [PATCH] Optimization of org.apache.derby.impl.services.uuid.BasicUUID.toByteArray() References: <41355B80.5010902@code.cz> <4137B722.50208@debrunners.com> <4137FD70.80602@code.cz> In-Reply-To: <4137FD70.80602@code.cz> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jan Hlavat� wrote: > Ah! These tildes seem to have been added when I sent the mail... Is this better? Index: java/engine/org/apache/derby/impl/services/uuid/BasicUUID.java =================================================================== - --- java/engine/org/apache/derby/impl/services/uuid/BasicUUID.java (revision 37291) +++ java/engine/org/apache/derby/impl/services/uuid/BasicUUID.java (working copy) @@ -279,26 +279,26 @@ byte[] result = new byte[16]; int lsequence = sequence; - - result[0] = (byte)((lsequence & 0xff000000) >>> 24); - - result[1] = (byte)((lsequence & 0x00ff0000) >>> 16); - - result[2] = (byte)((lsequence & 0x0000ff00) >>> 8); - - result[3] = (byte) (lsequence & 0x000000ff); + result[0] = (byte)(lsequence >>> 24); + result[1] = (byte)(lsequence >>> 16); + result[2] = (byte)(lsequence >>> 8); + result[3] = (byte)lsequence; long ltimemillis = timemillis; - - result[4] = (byte)((ltimemillis & 0x0000ff0000000000L) >>> 40); - - result[5] = (byte)((ltimemillis & 0x000000ff00000000L) >>> 32); - - result[6] = (byte)((ltimemillis & 0x00000000ff000000L) >>> 24); - - result[7] = (byte)((ltimemillis & 0x0000000000ff0000L) >>> 16); - - result[8] = (byte)((ltimemillis & 0x000000000000ff00L) >>> 8); - - result[9] = (byte) (ltimemillis & 0x00000000000000ffL); + result[4] = (byte)(ltimemillis >>> 40); + result[5] = (byte)(ltimemillis >>> 32); + result[6] = (byte)(ltimemillis >>> 24); + result[7] = (byte)(ltimemillis >>> 16); + result[8] = (byte)(ltimemillis >>> 8); + result[9] = (byte)ltimemillis; long linetaddr = majorId; - - result[10] = (byte)((linetaddr & 0x0000ff0000000000L) >>> 40); - - result[11] = (byte)((linetaddr & 0x000000ff00000000L) >>> 32); - - result[12] = (byte)((linetaddr & 0x00000000ff000000L) >>> 24); - - result[13] = (byte)((linetaddr & 0x0000000000ff0000L) >>> 16); - - result[14] = (byte)((linetaddr & 0x000000000000ff00L) >>> 8); - - result[15] = (byte) (linetaddr & 0x00000000000000ffL); + result[10] = (byte)(linetaddr >>> 40); + result[11] = (byte)(linetaddr >>> 32); + result[12] = (byte)(linetaddr >>> 24); + result[13] = (byte)(linetaddr >>> 16); + result[14] = (byte)(linetaddr >>> 8); + result[15] = (byte)linetaddr; return result; } -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iQEVAwUBQTf+0XFDePgyse5HAQJF7Af9H2WDpJN9YK5RPqM7ezm+mfS/zdUEgCFv 2J8GC9MfPTjRSXOHt3upuF7a427NUYY4+DIrTx8b/jNP/2vlSdIcHvPhGZZdYUbq jW9Cjxez3rkEv2mlqZG8LQtVN3+8KZALw7+urgLiiWLX2bORigW3apFyse9uQ29g hm3G5/8+BbvWsBeGzOCwIdaxqI/kxYJC7WYPqsMDQi1IlJDQ+RVCj51c3tR42orf Je4z+zB+hu4PjrzLYiRDK9dAeSuceIRiDwjLIH1TyYrETOdXyLYgaum75xuRbDf2 Sfydd5zm3VB5YcXR7nJtVQLbV4pVDHU+dsiqvnqiZkEIvaYXrWdJfA== =b6uf -----END PGP SIGNATURE-----