Skip to content

Commit 6e3afc1

Browse files
committed
wip
1 parent 89b4866 commit 6e3afc1

File tree

6 files changed

+61
-53
lines changed

6 files changed

+61
-53
lines changed

module/core/strs_tools/benchmarks/current_run_results.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Latest Benchmark Execution Results
22

3-
*Generated: 2025-08-06 11:40 UTC*
3+
*Generated: 2025-08-06 12:37 UTC*
44

55
## Benchmark Execution Summary
66

@@ -25,34 +25,34 @@ The benchmark system tests three critical bottlenecks:
2525

2626
### Detailed Timing Data
2727
**Multi-delimiter 2KB** (2KB)
28-
- Scalar: 2.492ms (801.7 MiB/s)
29-
- SIMD: 0.183ms (11.3 MiB/s)
30-
- **Improvement: 13.5x faster**
28+
- Scalar: 2.550ms (783.2 MiB/s)
29+
- SIMD: 0.187ms (11.5 MiB/s)
30+
- **Improvement: 13.3x faster**
3131

3232
**Multi-delimiter 10KB** (10KB)
33-
- Scalar: 13.018ms (768.1 MiB/s)
34-
- SIMD: 0.427ms (24.2 MiB/s)
35-
- **Improvement: 30.2x faster**
33+
- Scalar: 13.325ms (750.4 MiB/s)
34+
- SIMD: 0.437ms (24.8 MiB/s)
35+
- **Improvement: 29.9x faster**
3636

3737
**Multi-delimiter 50KB** (50KB)
38-
- Scalar: 90.716ms (551.1 MiB/s)
39-
- SIMD: 0.661ms (78.2 MiB/s)
40-
- **Improvement: 136.0x faster**
38+
- Scalar: 92.857ms (538.4 MiB/s)
39+
- SIMD: 0.677ms (80.1 MiB/s)
40+
- **Improvement: 134.4x faster**
4141

4242
**Large input 100KB** (100KB)
43-
- Scalar: 148.075ms (675.3 MiB/s)
44-
- SIMD: 9.051ms (11.4 MiB/s)
45-
- **Improvement: 16.3x faster**
43+
- Scalar: 151.570ms (659.8 MiB/s)
44+
- SIMD: 9.265ms (11.7 MiB/s)
45+
- **Improvement: 16.1x faster**
4646

4747
**Large input 500KB** (500KB)
48-
- Scalar: 795.599ms (628.4 MiB/s)
49-
- SIMD: 41.900ms (12.3 MiB/s)
50-
- **Improvement: 18.8x faster**
48+
- Scalar: 814.374ms (613.9 MiB/s)
49+
- SIMD: 42.889ms (12.6 MiB/s)
50+
- **Improvement: 18.6x faster**
5151

5252
**Pattern complexity - 8 delims** (10KB)
53-
- Scalar: 238.486ms (43.0 MiB/s)
54-
- SIMD: 1.119ms (9.5 MiB/s)
55-
- **Improvement: 211.4x faster**
53+
- Scalar: 244.114ms (42.0 MiB/s)
54+
- SIMD: 1.145ms (9.7 MiB/s)
55+
- **Improvement: 208.8x faster**
5656

5757

5858
## Performance Characteristics

module/core/strs_tools/benchmarks/detailed_results.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Based on recent benchmark runs, SIMD optimizations provide the following improve
88

99
| Test Category | Input Size | Improvement | Detailed Metrics |
1010
|---------------|------------|-------------|------------------|
11-
| Multi-delimiter 2KB | 2KB | 13.5x faster | Scalar: 2.49ms, SIMD: 0.18ms (11 MiB/s) |
12-
| Multi-delimiter 10KB | 10KB | 30.2x faster | Scalar: 13.02ms, SIMD: 0.43ms (24 MiB/s) |
13-
| Multi-delimiter 50KB | 50KB | 136.0x faster | Scalar: 90.72ms, SIMD: 0.66ms (78 MiB/s) |
14-
| Large input 100KB | 100KB | 16.3x faster | Scalar: 148.08ms, SIMD: 9.05ms (11 MiB/s) |
15-
| Large input 500KB | 500KB | 18.8x faster | Scalar: 795.60ms, SIMD: 41.90ms (12 MiB/s) |
16-
| Pattern complexity - 8 delims | 10KB | 211.4x faster | Scalar: 238.49ms, SIMD: 1.12ms (9 MiB/s) |
11+
| Multi-delimiter 2KB | 2KB | 13.3x faster | Scalar: 2.55ms, SIMD: 0.19ms (12 MiB/s) |
12+
| Multi-delimiter 10KB | 10KB | 29.9x faster | Scalar: 13.32ms, SIMD: 0.44ms (25 MiB/s) |
13+
| Multi-delimiter 50KB | 50KB | 134.4x faster | Scalar: 92.86ms, SIMD: 0.68ms (80 MiB/s) |
14+
| Large input 100KB | 100KB | 16.1x faster | Scalar: 151.57ms, SIMD: 9.26ms (12 MiB/s) |
15+
| Large input 500KB | 500KB | 18.6x faster | Scalar: 814.37ms, SIMD: 42.89ms (13 MiB/s) |
16+
| Pattern complexity - 8 delims | 10KB | 208.8x faster | Scalar: 244.11ms, SIMD: 1.15ms (10 MiB/s) |
1717

1818
## Bottleneck Analysis
1919

@@ -29,5 +29,5 @@ Based on recent benchmark runs, SIMD optimizations provide the following improve
2929

3030
---
3131

32-
*Generated: 2025-08-06 11:40 UTC*
32+
*Generated: 2025-08-06 12:37 UTC*
3333
*This file updated after each benchmark run*

module/core/strs_tools/benchmarks/readme.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## Executive Summary
44

5-
SIMD optimization provides **dramatic performance improvements** for string processing operations, with improvements ranging from **13.5x to 211.4x faster** depending on operation complexity.
5+
SIMD optimization provides **dramatic performance improvements** for string processing operations, with improvements ranging from **13.3x to 208.8x faster** depending on operation complexity.
66

77
## Key Results
88

9-
- **Multi-delimiter splitting**: 71.0x average improvement
10-
- **Large input processing**: 18.8x improvement on 500KB inputs
11-
- **Complex patterns**: 211.4x improvement with 8 delimiters
12-
- **Peak SIMD throughput**: 78.2 MiB/s vs 801.7 MiB/s scalar
9+
- **Multi-delimiter splitting**: 70.2x average improvement
10+
- **Large input processing**: 18.6x improvement on 500KB inputs
11+
- **Complex patterns**: 208.8x improvement with 8 delimiters
12+
- **Peak SIMD throughput**: 80.1 MiB/s vs 783.2 MiB/s scalar
1313

1414
## How to Run
1515

@@ -33,5 +33,5 @@ Benchmarks automatically update the following files:
3333

3434
---
3535

36-
*Last updated: 2025-08-06 11:40 UTC*
36+
*Last updated: 2025-08-06 12:37 UTC*
3737
*All documentation automatically generated during benchmark execution*

module/move/unilang/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ path = "tests/inc/phase3/data_model_features_test.rs"
9696
# name = "performance_stress_test"
9797
# path = "tests/inc/phase4/performance_stress_test.rs"
9898

99-
# Benchmark tests (ignored by default to prevent accidental long runs)
100-
[[test]]
99+
# Benchmark definitions using native Rust benchmarks
100+
[[bench]]
101101
name = "comprehensive_benchmark"
102102
path = "benchmarks/comprehensive_framework_comparison.rs"
103103

104-
[[test]]
105-
name = "throughput_benchmark"
104+
[[bench]]
105+
name = "throughput_benchmark"
106106
path = "benchmarks/throughput_benchmark.rs"
107107

108108
[[test]]

module/move/unilang/benchmarks/comprehensive_framework_comparison.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
//! exponentially increasing command counts, providing detailed metrics for
55
//! framework selection decisions.
66
7+
#![feature(test)]
8+
extern crate test;
9+
710
#[ cfg( feature = "benchmarks" ) ]
811
use std::time::{Duration, Instant};
912
#[ cfg( feature = "benchmarks" ) ]
@@ -1483,16 +1486,17 @@ fn run_comprehensive_benchmark() {
14831486
}
14841487

14851488
#[cfg(feature = "benchmarks")]
1486-
#[test]
1487-
#[ignore]
1488-
fn comprehensive_benchmark_test() {
1489-
run_comprehensive_benchmark();
1489+
#[bench]
1490+
fn comprehensive_benchmark(b: &mut test::Bencher) {
1491+
// Run the comprehensive benchmark once per iteration
1492+
b.iter(|| {
1493+
run_comprehensive_benchmark()
1494+
});
14901495
}
14911496

14921497
#[cfg(not(feature = "benchmarks"))]
1493-
#[test]
1494-
#[ignore]
1495-
fn comprehensive_benchmark_test() {
1496-
panic!("Benchmarks not enabled! Run with: cargo test comprehensive_benchmark_test --release --features benchmarks -- --ignored");
1498+
#[bench]
1499+
fn comprehensive_benchmark(_b: &mut test::Bencher) {
1500+
panic!("Benchmarks not enabled! Run with: cargo bench --features benchmarks");
14971501
}
14981502

module/move/unilang/benchmarks/throughput_benchmark.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
//! This benchmark focuses exclusively on runtime throughput testing across
44
//! different command counts, without compile-time measurements. Designed for
55
//! quick performance validation and regression testing.
6-
//!
6+
7+
#![feature(test)]
8+
extern crate test;
9+
710
//! ## Key Benchmarking Insights from Unilang Development:
811
//!
912
//! 1. **Two-Tier Strategy**: Fast throughput (30-60s) for daily validation,
@@ -913,17 +916,18 @@ fn run_throughput_benchmark() {
913916
}
914917

915918
#[cfg(feature = "benchmarks")]
916-
#[test]
917-
#[ignore]
918-
fn throughput_benchmark_test() {
919-
run_throughput_benchmark();
919+
#[bench]
920+
fn throughput_benchmark(b: &mut test::Bencher) {
921+
// Run the throughput benchmark once per iteration
922+
b.iter(|| {
923+
run_throughput_benchmark()
924+
});
920925
}
921926

922927
#[cfg(not(feature = "benchmarks"))]
923-
#[test]
924-
#[ignore]
925-
fn throughput_benchmark_test() {
926-
panic!("Benchmarks not enabled! Run with: cargo test throughput_benchmark_test --release --features benchmarks -- --ignored");
928+
#[bench]
929+
fn throughput_benchmark(_b: &mut test::Bencher) {
930+
panic!("Benchmarks not enabled! Run with: cargo bench --features benchmarks");
927931
}
928932

929933
#[cfg(test)]

0 commit comments

Comments
 (0)