Special case handling for intern

Bug #1847159 reported by Paul F. Dietz
6
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/wishlist request is to add a capability to do this to the implementation of INTERN and FIND-SYMBOL. For example, packages that inherit from COMMON-LISP might use this to improve the intern processing of the external symbols of that package.

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
Revision history for this message
Douglas Katzman (dougk) wrote :

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)

Changed in sbcl:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.