Skip to content
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

Remove (almost) all dead code #462

Merged
merged 8 commits into from
Oct 28, 2024
Merged

Conversation

matthiasgoergens
Copy link
Collaborator

@matthiasgoergens matthiasgoergens commented Oct 25, 2024

Here we review most of our code marked as dead.

Mostly either we remove the now unnecessary label, or we remove the code.

@@ -3,16 +3,6 @@ use ff_ext::ExtensionField;
use itertools::izip;
use simple_frontend::structs::{CellId, CircuitBuilder};

// TODO(Matthias): Check whether we need this function.
#[allow(dead_code)]
pub(crate) fn i64_to_base_field<E: ExtensionField>(x: i64) -> E::BaseField {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a copy and paste from singer-utils/src/chip_handler/range.rs (or vice versa).

Copy link
Collaborator

@bgillesp bgillesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Really appreciating the clean-up efforts.

/// A helper function to build eq(x, r) via dynamic programing tricks.
/// This function takes 2^num_var iterations, and per iteration with 1 multiplication.
#[allow(dead_code)]
fn build_eq_x_r_helper<E: ExtensionField>(r: &[E], buf: &mut [Vec<E>; 2]) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for general reference: the current implementation of build_eq_x_r uses a similar function build_eq_x_r_helper_sequential, so the removed unused code here looks to be redundant.

@matthiasgoergens matthiasgoergens merged commit 70fbefc into master Oct 28, 2024
6 checks passed
@matthiasgoergens matthiasgoergens deleted the matthias/dead-code-2 branch October 28, 2024 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants