Edi Weitz [edi@agharta.de] wrote:
On Tue, 8 Mar 2005 13:17:41 -0600, Kick Damien-DKICK1 DKICK1@motorola.com wrote:
New code: (EVAL-WHEN (EVAL COMPILE LOAD) (DEFVAR *STANDARD-SPEED-AND-SAFETY* '((SPEED 0) (SAFETY 3)))) (DEFUN FOO () (DECLARE (OPTIMIZE #.*STANDARD-SPEED-AND-SAFETY*)) ...)
Looks cool to me. How about a patch for CL-PPCRE?
So (optimize #.*standard-speed-and-safety*) does not actually work because it gives (optimize ((speed 0) (safety 3))) so I changed it to something like the following:
(defvar *standard-speed-and-safety* '(optimize (speed 0) (safety 3))) (defun foo () (declare #.*standard-speed-and-safety*) ...)
because I don't know of any way to "splice" the *standard-speed-and-safety* into the optimize form. Anyway, I've successfully run "(cl-ppcre-test:test)", with and without convincing Python to actually attempt optimization, but I've not rerun the benchmarks. BTW, instead of having two DEFPACKAGE forms in "packages.lisp", one with uninterned symbols and the other with srings, why not simply have one DEFPACKAGE form with srings? Anyway, I've attached a patch. Please let me know how it looks.
-- Damien Kick