[klout] the generatorrr

This commit is contained in:
soup 2024-12-21 19:22:49 -05:00
parent b665f2edf7
commit f303ddad1a
Signed by: soup
SSH key fingerprint: SHA256:GYxje8eQkJ6HZKzVWDdyOUF1TyDiprruGhE0Ym8qYDY

View file

@ -82,7 +82,7 @@ const fn char_data_max_index() -> usize {
// https://www3.nd.edu/~busiforc/handouts/cryptography/Letter%20Frequencies.html#Relative_frequencies_of_letters
const CHAR_FREQ_LOOKUP: [f64; char_data_max_index()] = {
let mut data: [f64; char_data_max_index()] = [1.; char_data_max_index()];
let mut data: [f64; char_data_max_index()] = [0.; char_data_max_index()];
macro_rules! d {
($ch:expr, $val:expr) => {{
@ -227,7 +227,7 @@ fn all_bigrams() -> &'static [String] {
unsafe { ALL_BIGRAMS.as_ref().unwrap_unchecked() }
}
const N_WORKERS: usize = 32;
const N_WORKERS: usize = 20;
fn mutate_layout(layout: &mut Layout, rng: &mut ThreadRng, num_swaps: usize) {
for _ in 0..num_swaps {
@ -349,8 +349,8 @@ fn main() -> Result<()> {
worker_thread_run(WorkerThreadInit {
initial_layout: INITIAL_LAYOUT,
report: tx,
max_dev: 200.,
swaps: 1,
max_dev: 500.,
swaps: 5,
})
})
})