Optimized release profile

This commit is contained in:
Avery Winters 2024-12-02 15:05:19 -06:00
parent 99d3e79bef
commit fc19cff445
Signed by: avery
SSH key fingerprint: SHA256:eesvLB5MMqHLZrAMFt6kEhqJWnASMLcET6Sgmw0FqZI
3 changed files with 7 additions and 5 deletions

View file

@ -3,4 +3,7 @@ resolver = "2"
members = ["calculate", "generate"]
[profile.release]
debug = true
debug = false
panic = "abort"
codegen-units = 1
lto = "fat"

View file

@ -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"

View file

@ -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<u8, LANES>;
#[inline(always)]
fn find_sep(b: &[u8]) -> Option<usize> {
memchr(b';', b)
}
#[inline(always)]
fn find_nl(b: &[u8]) -> Option<usize> {
memchr(b'\n', b)
}