Skip to content

Commit

Permalink
Remove some leftovers (#127)
Browse files Browse the repository at this point in the history
remove multicore feature in msm bench

remove useless prefetch feature
  • Loading branch information
kilic authored Jan 22, 2024
1 parent c1745de commit 219b3f5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
# We run WASM build (for tests) which compiles the lib allowig us to have
# `getrandom` as a dev-dependency.
- name: Build
run: cargo build --tests --release --features "bn256-table derive_serde prefetch" --target "${{ matrix.target }}"
run: cargo build --tests --release --features "bn256-table derive_serde" --target "${{ matrix.target }}"
test:
if: github.event.pull_request.draft == false
name: Test
Expand Down
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ asm = []
bits = ["ff/bits"]
bn256-table = []
derive_serde = ["serde/derive", "serde_arrays", "hex"]
prefetch = []
print-trace = ["ark-std/print-trace"]

[profile.bench]
Expand Down Expand Up @@ -83,4 +82,3 @@ harness = false
[[bench]]
name = "msm"
harness = false
required-features = ["multicore"]
4 changes: 2 additions & 2 deletions benches/msm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ use ff::Field;
use group::prime::PrimeCurveAffine;
use halo2curves::bn256::{Fr as Scalar, G1Affine as Point};
use halo2curves::msm::{best_multiexp, multiexp_serial};
use maybe_rayon::current_thread_index;
use maybe_rayon::prelude::{IntoParallelIterator, ParallelIterator};
use rand_core::SeedableRng;
use rand_xorshift::XorShiftRng;
use rayon::current_thread_index;
use rayon::prelude::{IntoParallelIterator, ParallelIterator};
use std::time::SystemTime;

const SAMPLE_SIZE: usize = 10;
Expand Down
12 changes: 0 additions & 12 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,3 @@ pub use pasta_curves::arithmetic::{Coordinates, CurveAffine, CurveExt};

#[cfg(test)]
pub mod tests;

#[cfg(all(feature = "prefetch", target_arch = "x86_64"))]
#[inline(always)]
pub fn prefetch<T>(data: &[T], offset: usize) {
use core::arch::x86_64::_mm_prefetch;
unsafe {
_mm_prefetch(
data.as_ptr().add(offset) as *const i8,
core::arch::x86_64::_MM_HINT_T0,
);
}
}

0 comments on commit 219b3f5

Please sign in to comment.