-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Purify all procedures, even when (declare (block)) not used
- Loading branch information
Showing
1 changed file
with
21 additions
and
13 deletions.
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
2015e0e
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.
This is cool. I suppose it doesn't affect the runtime or compiler because
(block)
is always declared in them. Do you know of any cases where this change makes a significant difference?2015e0e
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.
I haven't observed an actual speed improvement in my code because I typically use
(declare (block))
. However, I was doing some experimentation and noticed rather odd generated C code when(declare (block))
was not used. The generated code was correct but had many more labels that the "purification" step helps to remove. It is possible that the optimization work (removing and reordering labels) was just transferred to the C compiler.