Wanted: More efficient FIND-RESTART that doesn't COMPUTE-RESTARTS
Bug #769615 reported by
Jean-Philippe Paradis
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Low
|
Unassigned |
Bug Description
I noticed that FIND-RESTART, when given a non-nil symbol, uses this naive strategy:
(find identifier (compute-restarts condition) :key #'restart-name)
So, we're consing up a list of every restart in existence, and then traverse the list to find the appropriate one.
This looks like it could be a performance problem in recursive code that establishes lots of restarts and then uses FIND-RESTART, perhaps repeatedly. You might cons up a list of hundreds of restarts when the one you were looking for was just under your nose.
tags: | added: review |
Changed in sbcl: | |
status: | Triaged → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Expressing both FIND-RESTART and COMPUTE-RESTARTS in terms of MAP-RESTARTS would probably work.