Crypto takes 17 seconds to wind up for the throw...
Pawel Worach
pawel.worach at telia.com
Wed Oct 27 02:15:58 PDT 2004
Ian Grigg wrote:
> Cipher DES: 17025
What takes time in this situation I belive is.
// this depends on the quality of the randomness your system provides
SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
// done by Cipher.getInstance("DES"); in the background, the constructor
// of DESCipher is pretty slow, don't really know what is does, generates
// keys?
com.sun.crypto.provider.DESCipher dc =
new com.sun.crypto.provider.DESCipher();
Random stir: 1155 (those two above combined)
Cipher DES: 686 (if above is pre-done this goes faster)
Your system must be quite slow if that takes 17 seconds,
getInstance("DES") in your program out of the box took me 1230 msec.
Java HotSpot(TM) Client VM (build 1.4.2-p6-current-2004-07-21, mixed mode)
FreeBSD 6.0-CURRENT #0: Sun Oct 17 18:21:05 CEST 2004
PIII 600Mhz
ps. Any plans for getting the hotspot profiler working?
--
Pawel
More information about the freebsd-java
mailing list