From: Bruno Daniel <bruno.daniel@gm...>  20070802 08:33:59

Dear developers, > But adding an explicit THE FIXNUM around > the + would indeed make a small difference. as far as I understand the documentation, in the (optimize (speed 3) (safety 0 or 1)) case another, more general possibility is to use the types (deftype mword () '(unsignedbyte 32)) (deftype mwords () '(signedbyte 32)) (or the corresponding ones with 64 bits on a 64 machine) and modular arithmetic: http://www.sbcl.org/manual/Modulararithmetic.html (pushnew :optimize *features*) ;; for switching optimization on and off (defmacro as32 (a) ;; a macro for doing modular 32bit arithmetics `(logand ,a #xffffffff)) (declaim (ftype (function (mword mword) mword) f1)) (defun f1 (a b) (declare #+optimize (optimize (speed 3) (space 0) (safety 0) (debug 0))) (as32 (+ a b 1))) With this you get the efficiency and unsafety of C code, don't you? Is there any difference between using the ftype declaration and the following? (defun f1 (a b) (declare (type mword a b) (values mword) #+optimize (optimize (speed 3) (space 0) (safety 0) (debug 0))) (as32 (+ a b 1))) Best regards Bruno Daniel 