Summary
avoid recompilation of regular expressions, at least for simple cases
Metadata
- Id: 16e995e2c9b257d834f2b0c63b072b7780e9992c
- Trac id: 228
- Type: enhancement
- Reporter: felix
- Owner: felix
- Cc:
- Status: closed
- Component: compiler
- Estimated difficulty:
- Resolution: fixed
- Priority: not urgent at all
- Milestone:
- Version:
- Changetime: 2010-05-18 15:28:14 UTC
- Created: 2010-05-04 09:37:25 UTC
- Keywords: regex compilation syntax
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).