Opened 14 years ago

Closed 14 years ago

#228 closed enhancement (fixed)

avoid recompilation of regular expressions, at least for simple cases

Reported by: felix winkelmann Owned by: felix winkelmann
Priority: not urgent at all Milestone:
Component: compiler Version:
Keywords: regex compilation syntax Cc:
Estimated difficulty:

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))
    ...))

Change History (1)

comment:1 Changed 14 years ago by felix winkelmann

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.