Browse Source

perf: generate `ALL_SHORT_CODES`

master
Dnomd343 2 years ago
parent
commit
2809156d53
  1. 8
      src/rust_ffi/src/all_cases.rs

8
src/rust_ffi/src/all_cases.rs

@ -21,9 +21,11 @@ lazy_static! {
};
static ref ALL_SHORT_CODES: Vec<ShortCode> = {
ShortCode::warm_up_fast();
build_all_cases().iter()
.map(|code| CommonCode::new(*code).to_short_code())
let all_cases_size = unsafe {
Core::ALL_CASES_SIZE
};
(0..all_cases_size)
.map(|code| ShortCode::new(code))
.collect()
};
}

Loading…
Cancel
Save