[Openmcl-devel] just when you thought it was safe to go back in the CCL trunk

Stas Boukarev stassats at gmail.com
Mon Sep 14 17:35:57 PDT 2015


Ron Garret <ron at flownet.com> writes:
> But there is a fly in the ointment: Common Lisp does not include
> modulo 2^N arithmetic as primitives. You can only do mod 2^N math as
> an idiom, i.e. (setf (some-place-that-has-been-declared-to-be (type
> (un/signed-byte 32)) (mod (op v1 v2) #.(ash 1 32))). It is asking an
> awful lot of the compiler to recognize such idioms as optimizable into
> one or two machine instructions. And yet, it would be so tremendously
> useful, not just for crypto, but for image processing as well.
SBCL does that.

-- 
With best regards, Stas.



More information about the Openmcl-devel mailing list