Performance tweaks
This commit is contained in:
parent
bb0b008bbe
commit
e3ef141792
@ -14,6 +14,7 @@ use nix::unistd::Pid;
|
|||||||
|
|
||||||
use core::arch::x86_64 as arch_x86;
|
use core::arch::x86_64 as arch_x86;
|
||||||
|
|
||||||
|
use core::cmp::min;
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
@ -34,6 +35,7 @@ unsafe fn multiple_access(p: *const u8) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const SIZE: usize = 2 << 20;
|
const SIZE: usize = 2 << 20;
|
||||||
|
const MAX_SEQUENCE: usize = 2048 * 64;
|
||||||
|
|
||||||
#[derive(Clone, Copy, Hash, Eq, PartialEq, Debug)]
|
#[derive(Clone, Copy, Hash, Eq, PartialEq, Debug)]
|
||||||
struct ASV {
|
struct ASV {
|
||||||
@ -213,15 +215,15 @@ fn main() {
|
|||||||
let r = unsafe {
|
let r = unsafe {
|
||||||
calibrate_fixed_freq_2_thread(
|
calibrate_fixed_freq_2_thread(
|
||||||
pointer,
|
pointer,
|
||||||
64, // FIXME : MAGIC
|
64, // FIXME : MAGIC
|
||||||
array.len() as isize >> 3, // MAGIC
|
min(array.len(), MAX_SEQUENCE) as isize, // MAGIC
|
||||||
&mut core_pairs.into_iter(),
|
&mut core_pairs.into_iter(),
|
||||||
&operations,
|
&operations,
|
||||||
CalibrationOptions {
|
CalibrationOptions {
|
||||||
hist_params: HistParams {
|
hist_params: HistParams {
|
||||||
bucket_number: CFLUSH_BUCKET_NUMBER,
|
bucket_number: CFLUSH_BUCKET_NUMBER,
|
||||||
bucket_size: CFLUSH_BUCKET_SIZE,
|
bucket_size: CFLUSH_BUCKET_SIZE,
|
||||||
iterations: CFLUSH_NUM_ITER << 4,
|
iterations: CFLUSH_NUM_ITER,
|
||||||
},
|
},
|
||||||
verbosity: verbose_level,
|
verbosity: verbose_level,
|
||||||
optimised_addresses: true,
|
optimised_addresses: true,
|
||||||
|
@ -201,6 +201,7 @@ fn calibrate_fixed_freq_2_thread_impl<I: Iterator<Item = (usize, usize)>, T>(
|
|||||||
let mut calibrate_result_vec = Vec::new();
|
let mut calibrate_result_vec = Vec::new();
|
||||||
|
|
||||||
let offsets = image_antecedent.values().copied();
|
let offsets = image_antecedent.values().copied();
|
||||||
|
eprintln!("Number of offsets: {}", offsets.len());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
let offsets: Box<dyn Iterator<Item = isize>> = match image_antecedent {
|
let offsets: Box<dyn Iterator<Item = isize>> = match image_antecedent {
|
||||||
|
Loading…
Reference in New Issue
Block a user