classpathx-crypto
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Classpathx-crypto] Re: [patch] Inlined Serpent


From: Dag Arne Osvik
Subject: [Classpathx-crypto] Re: [patch] Inlined Serpent
Date: Thu, 5 Sep 2002 12:29:45 +0200 (MEST)

On Wed, 4 Sep 2002, Casey Marshall wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> (I'm CC'ing this to the crypto list, too)
>
> Attached is a patch to modify Serpent to use Dag Arne Osvik's inlined
> versions of the encryption and decryption methods. The key setup is
> still the same as before.
>
> The bad news is that it is NOT always faster than the current
> implementation. When run on Sun's HotSpot VMs (I've tried 1.3.1_04-b02,
> 1.4.0-b92, and 1.4.1-rc-b19 on Linux) the JIT will refuse to compile the
> encrypt and decrypt methods, and all en/decrypting is done in
> interpreted mode. Thus it is not much faster than interpreted mode (my
> guess is that Sun is terminally too clever for their own good, and
> their JIT will not compile methods that are too big or take too long to
> compile).

If you split the function in 2 or more chunks of code, their JIT will at
some point become able to compile each chunk.

>
> The good news is that with other VMs this implementation is MUCH faster.
> Kaffe (version 1.0.6, JIT v3) can get ~5.5 MB/s, and a native version
> produced by GCJ runs at ~8 MB/s (second fastest for encryption, behind
> Rijndael, and neck-and-neck with Anubis for decryption).

On what kind of processor?

I'm a bit curious about what kind of code GCJ produces.  Could you mail me
the compiled code, or even better, assembly output (-S)?

>
> If we can come up with a way to make this inlined version more
> digestible for certain JITs, I think this would be a good implementation
> for future releases.
>
> - --
> Casey Marshall < address@hidden > http://metastatic.org/
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
> Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org
>
> iD8DBQE9dr+/gAuWMgRGsWsRAreRAJ9poU8hDRPjyuhHSB5uJDRMXbb+DACeOePj
> 88OIle6lNPdlQGehIrsstFI=
> =Aw5o
> -----END PGP SIGNATURE-----
>


------------------------------------------------------------------------
Dag Arne Osvik                               http://www.ii.uib.no/~osvik





reply via email to

[Prev in Thread] Current Thread [Next in Thread]