Skip to content

fix: migrate from shell-words to shlex for shell parsing#2541

Open
mkroening wants to merge 1 commit into
mainfrom
shlex
Open

fix: migrate from shell-words to shlex for shell parsing#2541
mkroening wants to merge 1 commit into
mainfrom
shlex

Conversation

@mkroening

Copy link
Copy Markdown
Member

This PR migrates our shell parsing logic for kernel arguments from shell-words to shlex.
Both crates are hugely popular, but shlex is a bit more essential to the ecosystem.
This aligns the parsing crate with the quoting crate introduced in #2540.

I don't remember why I chose shell-words in #357.

This does allow avoiding allocating a vector, which is nice, but not that important.

@mkroening mkroening self-assigned this Jul 9, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Results

Details
Benchmark Current: 3f89033 Previous: 496a427 Performance Ratio
startup_benchmark Build Time 78.85 s 80.41 s 0.98
startup_benchmark File Size 0.80 MB 0.80 MB 1.00
Startup Time - 1 core 0.75 s (±0.01 s) 0.73 s (±0.02 s) 1.03
Startup Time - 2 cores 0.73 s (±0.02 s) 0.73 s (±0.02 s) 0.99
Startup Time - 4 cores 0.76 s (±0.02 s) 0.74 s (±0.02 s) 1.02
multithreaded_benchmark Build Time 77.28 s 81.45 s 0.95
multithreaded_benchmark File Size 0.89 MB 0.86 MB 1.03
Multithreaded Pi Efficiency - 2 Threads 88.75 % (±5.93 %) 89.19 % (±7.29 %) 1.00
Multithreaded Pi Efficiency - 4 Threads 44.51 % (±2.19 %) 43.23 % (±2.22 %) 1.03
Multithreaded Pi Efficiency - 8 Threads 25.61 % (±1.43 %) 25.70 % (±1.35 %) 1.00
micro_benchmarks Build Time 74.81 s 80.50 s 0.93
micro_benchmarks File Size 0.89 MB 0.86 MB 1.03
Scheduling time - 1 thread 63.61 ticks (±1.38 ticks) 61.77 ticks (±3.53 ticks) 1.03
Scheduling time - 2 threads 34.87 ticks (±3.97 ticks) 34.80 ticks (±4.41 ticks) 1.00
Micro - Time for syscall (getpid) 3.38 ticks (±0.52 ticks) 3.24 ticks (±0.53 ticks) 1.04
Memcpy speed - (built_in) block size 4096 83130.68 MByte/s (±57506.70 MByte/s) 82518.62 MByte/s (±57031.72 MByte/s) 1.01
Memcpy speed - (built_in) block size 1048576 30669.76 MByte/s (±24694.25 MByte/s) 30748.73 MByte/s (±24797.64 MByte/s) 1.00
Memcpy speed - (built_in) block size 16777216 29336.37 MByte/s (±24080.97 MByte/s) 26790.22 MByte/s (±22121.79 MByte/s) 1.10
Memset speed - (built_in) block size 4096 83361.41 MByte/s (±57689.01 MByte/s) 82944.82 MByte/s (±57257.89 MByte/s) 1.01
Memset speed - (built_in) block size 1048576 31426.03 MByte/s (±25142.74 MByte/s) 31513.05 MByte/s (±25249.82 MByte/s) 1.00
Memset speed - (built_in) block size 16777216 30116.26 MByte/s (±24541.13 MByte/s) 27578.05 MByte/s (±22634.55 MByte/s) 1.09
Memcpy speed - (rust) block size 4096 76540.57 MByte/s (±53309.69 MByte/s) 77062.45 MByte/s (±53546.55 MByte/s) 0.99
Memcpy speed - (rust) block size 1048576 30628.81 MByte/s (±24701.58 MByte/s) 30445.41 MByte/s (±24660.75 MByte/s) 1.01
Memcpy speed - (rust) block size 16777216 29545.01 MByte/s (±24263.76 MByte/s) 27553.35 MByte/s (±22787.50 MByte/s) 1.07
Memset speed - (rust) block size 4096 76952.16 MByte/s (±53607.34 MByte/s) 77521.43 MByte/s (±53878.01 MByte/s) 0.99
Memset speed - (rust) block size 1048576 31380.05 MByte/s (±25140.74 MByte/s) 31217.22 MByte/s (±25122.56 MByte/s) 1.01
Memset speed - (rust) block size 16777216 30297.36 MByte/s (±24693.55 MByte/s) 28357.26 MByte/s (±23299.40 MByte/s) 1.07
alloc_benchmarks Build Time 75.66 s 75.20 s 1.01
alloc_benchmarks File Size 0.87 MB 0.87 MB 1.00
Allocations - Allocation success 91.31 % 91.31 % 1
Allocations - Deallocation success 100.00 % 100.00 % 1
Allocations - Pre-fail Allocations 61.44 % 61.44 % 1
Allocations - Average Allocation time 2842.50 Ticks (±893.21 Ticks) 5199.04 Ticks (±177.30 Ticks) 0.55
Allocations - Average Allocation time (no fail) 3866.64 Ticks (±800.68 Ticks) 5969.39 Ticks (±137.74 Ticks) 0.65
Allocations - Average Deallocation time 808.46 Ticks (±152.44 Ticks) 1612.60 Ticks (±268.46 Ticks) 0.50
mutex_benchmark Build Time 82.78 s 76.02 s 1.09
mutex_benchmark File Size 0.89 MB 0.86 MB 1.03
Mutex Stress Test Average Time per Iteration - 1 Threads 11.98 ns (±0.37 ns) 11.94 ns (±0.37 ns) 1.00
Mutex Stress Test Average Time per Iteration - 2 Threads 40.24 ns (±2.01 ns) 40.06 ns (±2.30 ns) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant