-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Another step toward full unrolling of loops: cache extracted body #131
Conversation
Also: * rename a few more things * remove unnecessary derives
/// Exists only to stabilize function order for lit test output. | ||
func_creation_order: RefCell<Vec<String>>, |
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.
If we care about the performance impact of this, we would need to add a cmd line flag for lit testing I think.
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 would measure first before jumping into tweaking performance but if so I would guard the ordering code into a compile flag, debug builds is sorted, release builds not necessarily. Vanguard is going to use the release builds to we get both benefits
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 had considered using debug build flag but I think the GitHub CI runs a release build so there would be intermittent failures here.
Excerpt from the CI log:
circom-unknown> Running phase: configurePhase
circom-unknown> [naersk] cargo_version (read): 1.74.0
circom-unknown> [naersk] cargo_message_format (set): json-diagnostic-rendered-ansi
circom-unknown> [naersk] cargo_release: --release
circom-unknown> [naersk] cargo_options:
circom-unknown> [naersk] cargo_build_options: $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format
circom-unknown> [naersk] cargo_test_options: $cargo_release -j "$NIX_BUILD_CORES"
...
circom-unknown> Running phase: buildPhase
circom-unknown> cargo build $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format
...
circom-unknown> buildPhase completed in 1 minutes 35 seconds
circom-unknown> Running phase: checkPhase
circom-unknown> cargo test $cargo_release -j "$NIX_BUILD_CORES"
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.
We could go back to a manual CI script then, to get more control. I honestly don't like leaving nix handle everything
Avoid creating identical extracted functions when the same loop is encountered with different iteration counts.
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.
Just some code organization thoughts
/// Exists only to stabilize function order for lit test output. | ||
func_creation_order: RefCell<Vec<String>>, |
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 would measure first before jumping into tweaking performance but if so I would guard the ordering code into a compile flag, debug builds is sorted, release builds not necessarily. Vanguard is going to use the release builds to we get both benefits
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.
LGTM, other than Daniel's requests.
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.
We gucci
No description provided.