fixes
This commit is contained in:
parent
e00415cad6
commit
88ee6c7b8d
@ -27,6 +27,13 @@ opt-level = 0
|
|||||||
lto = "thin"
|
lto = "thin"
|
||||||
strip = false
|
strip = false
|
||||||
|
|
||||||
|
[profile.bench]
|
||||||
|
debug = true
|
||||||
|
codegen-units = 1
|
||||||
|
opt-level = 3
|
||||||
|
lto = "thin"
|
||||||
|
strip = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
parsing = { path = "./parsing" }
|
parsing = { path = "./parsing" }
|
||||||
benchmarks = { path = "./benchmarks" }
|
benchmarks = { path = "./benchmarks" }
|
||||||
|
|||||||
@ -27,6 +27,8 @@ pub fn split_function(input: &str) -> Vec<String> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// __REVIEW__
|
// __REVIEW__
|
||||||
|
// __OPTIMIZE__
|
||||||
|
// takes up to 33% of performance in calls like `buffer.iter().cloned().collect::<String>()` along with allocating `data` and `buffer` vectors
|
||||||
pub fn split_function_chars(chars: &[char]) -> Vec<String> {
|
pub fn split_function_chars(chars: &[char]) -> Vec<String> {
|
||||||
if chars.is_empty() {
|
if chars.is_empty() {
|
||||||
return Vec::new();
|
return Vec::new();
|
||||||
@ -94,7 +96,7 @@ pub fn split_function_chars(chars: &[char]) -> Vec<String> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If letter and not a variable (or a masked variable)
|
// If letter and not a variable (or a masked variable)
|
||||||
if prev_char.letter && prev_char.is_variable() {
|
if prev_char.letter && !prev_char.is_variable() {
|
||||||
// Mask number status if current char is number
|
// Mask number status if current char is number
|
||||||
if curr_c.number {
|
if curr_c.number {
|
||||||
curr_c.masked_num = true;
|
curr_c.masked_num = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user