Summary

avoid recompilation of regular expressions, at least for simple cases

Metadata

Description

Compiler syntax for `string-(search|match)[[-positions]|]` with literal or quoted first argument could transform into code that uses a "latch":

 (string-XXX LIT ...)
 
 ~>
 
 (let* ((T1 '#(#f))
        (T2 (##sys#slot T1 0)))
   (string-XXX
     (or T2
         (let ((T3 (regexp LIT)))
           (##sys#setslot T1 0 T3)
           T3))
     ...))

Changes and comments

[2010-05-18 15:28:14 UTC] felix changed status from new to closed

[2010-05-18 15:28:14 UTC] felix set resolution to fixed

[2010-05-18 15:28:14 UTC] felix wrote:

The internal routine used to canonicalize regular-expression arguments now keeps a global cache which speeds up things considerably (commit 5760e2dc26dcc5cc24a3d09b6042e3acfb49251c, branch experimental).