Overview
| Artifact ID: | 79448d37eb8265dbc0fb8b4621cc2304827fa7a5 |
|---|---|
| Ticket: | 1737021fffffffffffffffffffffffffffffffff
unacceptable performance gap for switch |
| User & Date: | dkf on 2007-06-14 17:08:36 |
Changes
- assignee changed to: "dkf"
- closedate changed to: "2007-06-14T10:08:36"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Originator: NO I'm not quite sure what I'm supposed to do to trigger the change (all the patterns already have ^ characters!) but I would note that you seem to be going out of your way to make your code inefficient. In particular, you use lots of runtime-generated patterns, which means that you defeat both the in-value and per-thread RE caches, forcing recompilation of each pattern every time through the loop. That sucks, but you've managed to create a horrible degenerate case. If you change your code so that you keep each *whole* RE in the "global" array instead of just fragments, you'll find the code goes much faster. (Alternatively, use fewer REs so that the per-thread cache isn't exceeded, but that might not be easy with real-life REs.) Otherwise, I've no idea what I'm supposed to do about this to magically make your code efficient. (Caching RE fragments would be horribly tricky to implement - it requires lots of changes in lots of places, including wholly new APIs - but that's the only thing I can think of which would guarantee to make your code zippy...)
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Wont Fix"
- status changed to: "Pending"
- username: "dkf"