Skip to content

Commit fd391b1

Browse files
committed
wip
1 parent 315a4b9 commit fd391b1

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,9 +726,11 @@ version = "7.0.4"
726726

727727
[workspace.dependencies.memchr]
728728
version = "2.7"
729+
default-features = false
729730

730731
[workspace.dependencies.aho-corasick]
731732
version = "1.1"
733+
default-features = false
732734

733735
[workspace.dependencies.bytecount]
734736
version = "0.6"

module/core/strs_tools/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ strs_tools_meta = { path = "strs_tools_meta", optional = true }
124124
# SIMD optimization dependencies (optional)
125125
# When simd feature is disabled, these dependencies are not included at all
126126
# When simd feature is enabled, these dependencies use their SIMD-optimized features
127-
memchr = { workspace = true, optional = true, default-features = false, features = [] }
128-
aho-corasick = { workspace = true, optional = true, default-features = false, features = [] }
127+
memchr = { workspace = true, optional = true }
128+
aho-corasick = { workspace = true, optional = true }
129129
bytecount = { workspace = true, optional = true }
130130
lazy_static = { version = "1.4", optional = true }
131131

module/core/strs_tools/src/string/specialized.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,8 @@ pub struct BoyerMooreSplitIterator<'a> {
428428
/// Fixed pattern to search for
429429
pattern: &'a str,
430430
/// Bad character table for Boyer-Moore optimization (ASCII only)
431+
/// Currently unused as simplified search is used for performance vs complexity tradeoff
432+
#[allow(dead_code)]
431433
bad_char_table: [ usize; 256 ],
432434
/// Current position in input string
433435
position: usize,

module/move/unilang/benchmarks/strs_tools_benchmark.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
//! of unilang parsing tasks.
66
77
use criterion::{ black_box, criterion_group, criterion_main, Criterion };
8-
use unilang::types::Value;
98
use unilang::data::Kind;
109

1110
/// Generate test data for list parsing benchmarks
@@ -119,7 +118,7 @@ fn benchmark_complex_scenario(c: &mut Criterion) {
119118
b.iter(|| {
120119
for (name, data, kind) in &complex_data {
121120
let result = unilang::types::parse_value(black_box(data), black_box(kind));
122-
black_box((name, result));
121+
black_box((name, result.unwrap_or_default()));
123122
}
124123
})
125124
});
@@ -161,6 +160,7 @@ fn benchmark_throughput(c: &mut Criterion) {
161160
group.finish();
162161
}
163162

163+
/// Benchmark group for strs_tools SIMD performance testing
164164
criterion_group!(
165165
benches,
166166
benchmark_list_parsing,

module/move/unilang_parser/src/parser_engine.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl Parser
3939
{
4040
let splits_iter = strs_tools::split()
4141
.src( input )
42-
.delimeter( vec![ " ", "\n", "\t", "\r", "::", "?", "#", ".", "!" ] )
42+
.delimeters( &[ " ", "\n", "\t", "\r", "::", "?", "#", ".", "!" ] )
4343
.preserving_delimeters( true )
4444
.quoting( true )
4545
.preserving_quoting( false )
@@ -75,12 +75,11 @@ impl Parser
7575
{
7676
let segments : Vec< Split< '_ > > = strs_tools::split()
7777
.src( input )
78-
.delimeter( vec![ ";;" ] )
78+
.delimeters( &[ ";;" ] )
7979
.preserving_delimeters( true )
8080
.preserving_empty( false ) // Do not preserve empty segments for whitespace
8181
.stripping( true ) // Strip leading/trailing whitespace from delimited segments
82-
.form()
83-
.split()
82+
.perform()
8483
.collect();
8584

8685
let mut instructions = Vec::new();

0 commit comments

Comments
 (0)