-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use FILE * instead of filenames when passing file paths to serializat…
…ion and printing commands (#968) Previously we were storing a filename in a global variable and then passing it to a bunch of functions. Each of these functions then had to call fopen and fclose, which was quite expensive. This PR changes the behavior so instead we once open a file with fopen at the start of rewriting, then call a bunch of functions which take a `FILE *` as an argument, then call fclose once at the end. This gets much better buffering behavior and reduces the number of syscalls considerably. When measuring the performance of this code against a "sum to 10k" imp program with proof hint generation enabled, we saw a time reduction from 3.5m to 2m.
- Loading branch information
Dwight Guth
authored
Feb 7, 2024
1 parent
b6c80c9
commit 049f2d0
Showing
8 changed files
with
36 additions
and
67 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
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
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