From ab336ca10085769c9a0ba4784e931ef3d991700f Mon Sep 17 00:00:00 2001 From: Jingtao Xu Date: Thu, 26 Oct 2023 10:57:22 +0800 Subject: [PATCH] Improve performance in LispWorks. --- src/ciphers/blowfish.lisp | 2 ++ src/common.lisp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ciphers/blowfish.lisp b/src/ciphers/blowfish.lisp index 06240f8..77d19c6 100644 --- a/src/ciphers/blowfish.lisp +++ b/src/ciphers/blowfish.lisp @@ -244,6 +244,8 @@ (store-words ciphertext ciphertext-start right left))) (defun initialize-blowfish-vectors (key p-array s-boxes) + #+lispworks + (declare (optimize (debug 0) (float 0) (space 0) (safety 0) (speed 3))) (declare (type (simple-array (unsigned-byte 8) (*)) key)) (declare (type blowfish-p-array p-array)) (declare (type blowfish-s-boxes s-boxes)) diff --git a/src/common.lisp b/src/common.lisp index fd2be82..cc5ff61 100644 --- a/src/common.lisp +++ b/src/common.lisp @@ -404,7 +404,8 @@ uint64_t r = (n << 56) (ftype (function ((unsigned-byte 32) (unsigned-byte 32)) (unsigned-byte 32)) mod32+)) (defun mod32+ (a b) - (declare (type (unsigned-byte 32) a b)) + (declare (type (unsigned-byte 32) a b) + #+lispworks(optimize (debug 0) (space 0) (safety 0) (float 0) (speed 3))) #+(and ccl x86-64 ironclad-assembly) (%mod32+ a b)