Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize symbol lookup at compunit creation time
Do lexical lookup in setting whent already loaded. Reduces number of calls to ModuleLoader by ~10 per each compunit creation.
- Loading branch information
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3583254
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
$!unit_ready
even used anymore? Seems like you could just reuse that name and remove the existing$!unit_ready :=
lines even3583254
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The presense of setting doesn't mean that a unit is ready. Thus
$!setting_loaded
is more correct name here. Otherwise you're right and we can just get rid of$!unit_ready
. My initial thought was that it might be useful for 3rd party code acting at compile time, but neither we expose the attribute to the public nor I can currently think of any code able to operate at such early stages of unit lifetime.