TR: [cl-ppcre-devel] New release 1.2.4

Kick Damien-DKICK1 DKICK1 at motorola.com
Wed Mar 9 05:34:48 UTC 2005


Edi Weitz [edi at agharta.de] wrote:

> On Tue, 8 Mar 2005 13:17:41 -0600, Kick Damien-DKICK1
> <DKICK1 at 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 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diffs.patch
Type: application/octet-stream
Size: 58584 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cl-ppcre-devel/attachments/20050308/a2722f89/attachment.obj>


More information about the Cl-ppcre-devel mailing list