Optimized release profile
This commit is contained in:
parent
99d3e79bef
commit
fc19cff445
3 changed files with 7 additions and 5 deletions
|
@ -3,4 +3,7 @@ resolver = "2"
|
||||||
members = ["calculate", "generate"]
|
members = ["calculate", "generate"]
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
debug = true
|
debug = false
|
||||||
|
panic = "abort"
|
||||||
|
codegen-units = 1
|
||||||
|
lto = "fat"
|
||||||
|
|
|
@ -3,10 +3,6 @@ name = "bilrow-calculate"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
[profile.release]
|
|
||||||
debug = true
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.5.7", features = ["derive"] }
|
clap = { version = "4.5.7", features = ["derive"] }
|
||||||
bumpalo-herd = "0.1.2"
|
bumpalo-herd = "0.1.2"
|
||||||
|
|
|
@ -133,6 +133,7 @@ pub(crate) fn run(args: Args) -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
fn parse_temp(input: &[u8], sep_pos: usize, nl_pos: usize) -> i64 {
|
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 sign = 2 * (unsafe { *input.get_unchecked(sep_pos + 1) } != b'-') as i64 - 1;
|
||||||
let a_byte = unsafe { *input.get_unchecked(nl_pos - 4) };
|
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;
|
const LANES: usize = 32;
|
||||||
type Chunk = Simd<u8, LANES>;
|
type Chunk = Simd<u8, LANES>;
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
fn find_sep(b: &[u8]) -> Option<usize> {
|
fn find_sep(b: &[u8]) -> Option<usize> {
|
||||||
memchr(b';', b)
|
memchr(b';', b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
fn find_nl(b: &[u8]) -> Option<usize> {
|
fn find_nl(b: &[u8]) -> Option<usize> {
|
||||||
memchr(b'\n', b)
|
memchr(b'\n', b)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue