-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf!: refactor
Program
to reduce clone
time
Extract most fields (see the code for the details) in `Program` into a new `SharedProgramData` structure, then add a field `shared_program_data: Arc<SharedProgramData>` to `Program`, so cloning doesn't deep copy them. These were selected based on how often the runner needed to access them directly, as the indirection and heap access proved to come with a runtime cost. Frequently accessed fields are still copied because of that. The break comes from hiding some symbols (as they were moved to the new structure), but those shouldn't have been exposed in the first place, so I expect no breakage for real-world programs (cue Hyrum's law).
- Loading branch information
Showing
7 changed files
with
235 additions
and
145 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
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
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
Oops, something went wrong.