Special case handling for intern
Bug #1847159 reported by
Paul F. Dietz
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
The mapping from strings to symbols in INTERN is currently done with a hash table. However, in an application I found using an optimized decision tree could be much faster.
This enhancement/
This optimization could be done statically, with profile guidance, or even dynamically (after a certain number of interns on a package, produce and compile a specialized intern function for that package.)
description: | updated |
To post a comment you must log in.
I can't really see INTERN as something that any of the developers could devote time to improving.
More likely, we should speed up string comparison, and also not compute hashes using all character in a string. Perhaps the leading 8 chars and trailing 8 chars will contain enough entropy, with the full string= to deal with collision resolution. So while I see this special-case request as a wont-fix, it would definitely be interesting to see the performance tradeoff of purposely worse hashes, in the hope of spending less time doing it, provided we also have a faster comparator.
(and if we had feedback-directed optimization, it had best be more general than to speed up INTERN)