Re: [precis] Precis Java Implementation

Sam Whited <sam@samwhited.com> Wed, 23 December 2015 15:03 UTC

Return-Path: <sam@samwhited.com>
X-Original-To: precis@ietfa.amsl.com
Delivered-To: precis@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7365D1A017E for <precis@ietfa.amsl.com>; Wed, 23 Dec 2015 07:03:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.379
X-Spam-Level:
X-Spam-Status: No, score=-1.379 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9yxLda4pKs00 for <precis@ietfa.amsl.com>; Wed, 23 Dec 2015 07:02:59 -0800 (PST)
Received: from mail-qg0-x22d.google.com (mail-qg0-x22d.google.com [IPv6:2607:f8b0:400d:c04::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 257CF1A017F for <precis@ietf.org>; Wed, 23 Dec 2015 07:02:59 -0800 (PST)
Received: by mail-qg0-x22d.google.com with SMTP id 6so735907qgy.1 for <precis@ietf.org>; Wed, 23 Dec 2015 07:02:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samwhited.com; s=swgoo; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=/8sZqEsLXJTIgLkm7VW1XSiqLcu0f3Mdx1DPo8PBBt4=; b=utYe7zt6iBZExmAUt38VEGdwFPefg2/oZ3gefW576bo3oyfdkYv8jD1X6/ZQXHfCYr 2Z+rmdH7K+90kv23oX9NMcmL1PxhuEzhHkPFMjF7POO2DiYSCojYrwEnfFZ0MfKmZ+MZ jU8r410yfbEjdNJSYgAHrBThAhROnXkKvBsUY=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=/8sZqEsLXJTIgLkm7VW1XSiqLcu0f3Mdx1DPo8PBBt4=; b=b/2D5P6pDQ3lg7ggXQOXYu7oa+ozVUharpy7L90UgLcmAjoIQou7hb3lYvJF45LfAS ccnbQQqxkCb+6lX1EcO095wnqLIZX+1IsCSR8V48a0D9YAFxeUC+ZxJiXdTzyXz04eT7 WCXqqf36QTJ6v1EhTEM6HHV4qe5z/4JyuKYvPQg2gOlkyPVGe5qb1ahmQPMSpnhs4APM Lq0jO+Npa6FoxoTpFdW05SOAGOTmg6SeFIRgfUS3NpsJqnUjaCz4l2/TRDvuLfM7QTJv lp5FRM34RhDyh7PCR6fpbPnauSOY31ZzGSP8CjOOXRusMTgBnSIDtHBWD6tJkU2XamoK vFXQ==
X-Gm-Message-State: ALoCoQnyq5q6fCoORk7t8l/X8hjoWDwR64hVlYN23ezPjF7XrioDzid3EOd+4M5kuOZuAgSKKplXWvE01shSapLGhj/8g3u0FQ==
X-Received: by 10.140.234.17 with SMTP id f17mr43951375qhc.19.1450882978290; Wed, 23 Dec 2015 07:02:58 -0800 (PST)
MIME-Version: 1.0
Received: by 10.55.10.133 with HTTP; Wed, 23 Dec 2015 07:02:18 -0800 (PST)
X-Originating-IP: [72.48.156.244]
In-Reply-To: <8581502F-058F-4A21-A1A4-454BC0734DE8@gmx.de>
References: <3012FFC8-1FAD-4C30-8D85-175F4180BC02@gmx.de> <CAHbk4RLPP4LeLgM=aigNLXnbUJ0gQ+Lcsji66huFXpu5qu2fQQ@mail.gmail.com> <A295CC65-6A47-45DB-8539-A25E9A8361B7@gmx.de> <CAHbk4R++se1zCX2tP3rdp_gQZ7eBMmc-7s+m9u3r-+U0ziCvMA@mail.gmail.com> <8581502F-058F-4A21-A1A4-454BC0734DE8@gmx.de>
From: Sam Whited <sam@samwhited.com>
Date: Wed, 23 Dec 2015 09:02:18 -0600
Message-ID: <CAHbk4RLoghXSxM+5S2ELB_a0s9PrBD6ohhznwazPxxFM42kfEQ@mail.gmail.com>
To: Christian Schudt <christian.schudt@gmx.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Archived-At: <http://mailarchive.ietf.org/arch/msg/precis/b__5LBMj4CG4d4Bh38I5aLjDe5I>
Cc: precis@ietf.org
Subject: Re: [precis] Precis Java Implementation
X-BeenThere: precis@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Preparation and Comparison of Internationalized Strings <precis.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/precis>, <mailto:precis-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/precis/>
List-Post: <mailto:precis@ietf.org>
List-Help: <mailto:precis-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/precis>, <mailto:precis-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 23 Dec 2015 15:03:00 -0000

On Wed, Dec 23, 2015 at 3:16 AM, Christian Schudt
<christian.schudt@gmx.de>; wrote:
> If you are interested, in Java getting the character type (property) is even a bit slower, but it’s of course machine dependent:
>
> java.lang.Character.getType(codepoint) is constantly 39 ns/op on 300000000 iterations on my machine, no matter if it’s an ascii or a fullwidth character. (Oracle JDK 8 SE).
> Java uses huge Unicode arrays internally to lookup the code point, I doubt that there’s much room for optimization and even if, probably nobody cares when saving a few nano seconds.

Thanks! I actually am really interested; I used to do a lot of work on
Conversations (Android XMPP client) and was the one who originally
wrote the JID class / stringprep stuff for it. I'm planning on
updating it to use your library at some point, and my work roster is
rather large (several thousand people) which makes things incredibly
slow with the current stringprep implementation; I'm hoping this will
be a lot faster!

Thanks again for all your hard work on this.

Best,
Sam



-- 
Sam Whited
pub 4096R/54083AE104EA7AD3
https://blog.samwhited.com