diff --git a/Cargo.toml b/Cargo.toml index 6230b63..767aa5f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,4 +3,7 @@ resolver = "2" members = ["calculate", "generate"] [profile.release] -debug = true \ No newline at end of file +debug = false +panic = "abort" +codegen-units = 1 +lto = "fat" diff --git a/calculate/Cargo.toml b/calculate/Cargo.toml index fe20cb1..ab4df46 100644 --- a/calculate/Cargo.toml +++ b/calculate/Cargo.toml @@ -3,10 +3,6 @@ name = "bilrow-calculate" version = "0.1.0" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[profile.release] -debug = true - [dependencies] clap = { version = "4.5.7", features = ["derive"] } bumpalo-herd = "0.1.2" diff --git a/calculate/src/optimized.rs b/calculate/src/optimized.rs index 08b3d12..c13f031 100644 --- a/calculate/src/optimized.rs +++ b/calculate/src/optimized.rs @@ -133,6 +133,7 @@ pub(crate) fn run(args: Args) -> Result<()> { Ok(()) } +#[inline(always)] fn parse_temp(input: &[u8], sep_pos: usize, nl_pos: usize) -> i64 { let sign = 2 * (unsafe { *input.get_unchecked(sep_pos + 1) } != b'-') as i64 - 1; let a_byte = unsafe { *input.get_unchecked(nl_pos - 4) }; @@ -145,10 +146,12 @@ fn parse_temp(input: &[u8], sep_pos: usize, nl_pos: usize) -> i64 { const LANES: usize = 32; type Chunk = Simd; +#[inline(always)] fn find_sep(b: &[u8]) -> Option { memchr(b';', b) } +#[inline(always)] fn find_nl(b: &[u8]) -> Option { memchr(b'\n', b) }