Skip to content

Conversation

@fogti
Copy link
Contributor

@fogti fogti commented Jan 10, 2026

I realized that by "just" factoring out all path traversal handling, I don't even need to introduce an std::path::Path equivalent.

The afaik only disadvantage that this has is the re-allocations during traversal into fuse and uhyve filesystems.

@mkroening mkroening self-assigned this Jan 10, 2026
@fogti fogti force-pushed the path branch 3 times, most recently from 19bd9ce to aef532d Compare January 10, 2026 15:13
Copy link
Contributor

@github-actions github-actions bot left a comment

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: 34a1489 Previous: 3cd03d6 Performance Ratio
startup_benchmark Build Time 96.60 s 100.84 s 0.96
startup_benchmark File Size 0.87 MB 0.87 MB 1.00
Startup Time - 1 core 0.93 s (±0.03 s) 0.93 s (±0.03 s) 1.00
Startup Time - 2 cores 0.93 s (±0.03 s) 0.94 s (±0.03 s) 1.00
Startup Time - 4 cores 0.93 s (±0.03 s) 0.95 s (±0.03 s) 0.98
multithreaded_benchmark Build Time 94.39 s 100.39 s 0.94
multithreaded_benchmark File Size 0.96 MB 0.97 MB 1.00
Multithreaded Pi Efficiency - 2 Threads 90.07 % (±8.34 %) 87.95 % (±9.33 %) 1.02
Multithreaded Pi Efficiency - 4 Threads 45.05 % (±2.94 %) 43.47 % (±4.11 %) 1.04
Multithreaded Pi Efficiency - 8 Threads 25.98 % (±1.68 %) 25.22 % (±2.42 %) 1.03
micro_benchmarks Build Time 94.38 s 102.95 s 0.92
micro_benchmarks File Size 0.97 MB 0.97 MB 1.00
Scheduling time - 1 thread 66.58 ticks (±3.52 ticks) 67.76 ticks (±3.18 ticks) 0.98
Scheduling time - 2 threads 37.87 ticks (±5.47 ticks) 38.55 ticks (±4.67 ticks) 0.98
Micro - Time for syscall (getpid) 4.09 ticks (±0.59 ticks) 3.28 ticks (±0.46 ticks) 1.25
Memcpy speed - (built_in) block size 4096 68022.34 MByte/s (±48375.00 MByte/s) 66854.78 MByte/s (±47513.08 MByte/s) 1.02
Memcpy speed - (built_in) block size 1048576 29687.70 MByte/s (±24243.86 MByte/s) 29456.92 MByte/s (±24262.14 MByte/s) 1.01
Memcpy speed - (built_in) block size 16777216 28617.49 MByte/s (±23797.04 MByte/s) 25391.23 MByte/s (±21398.03 MByte/s) 1.13
Memset speed - (built_in) block size 4096 68769.70 MByte/s (±48921.00 MByte/s) 67572.37 MByte/s (±48042.01 MByte/s) 1.02
Memset speed - (built_in) block size 1048576 30454.04 MByte/s (±24694.59 MByte/s) 30174.03 MByte/s (±24654.07 MByte/s) 1.01
Memset speed - (built_in) block size 16777216 29400.06 MByte/s (±24243.55 MByte/s) 26167.90 MByte/s (±21892.89 MByte/s) 1.12
Memcpy speed - (rust) block size 4096 61446.31 MByte/s (±45381.42 MByte/s) 60927.86 MByte/s (±44852.89 MByte/s) 1.01
Memcpy speed - (rust) block size 1048576 29623.98 MByte/s (±24316.82 MByte/s) 29458.32 MByte/s (±24213.91 MByte/s) 1.01
Memcpy speed - (rust) block size 16777216 28666.47 MByte/s (±23849.16 MByte/s) 25620.96 MByte/s (±21555.28 MByte/s) 1.12
Memset speed - (rust) block size 4096 62116.17 MByte/s (±45802.06 MByte/s) 62100.91 MByte/s (±45643.48 MByte/s) 1.00
Memset speed - (rust) block size 1048576 30384.42 MByte/s (±24756.21 MByte/s) 30220.35 MByte/s (±24662.76 MByte/s) 1.01
Memset speed - (rust) block size 16777216 29444.85 MByte/s (±24294.05 MByte/s) 26401.04 MByte/s (±22047.35 MByte/s) 1.12
alloc_benchmarks Build Time 92.55 s 91.80 s 1.01
alloc_benchmarks File Size 0.94 MB 0.94 MB 1.00
Allocations - Allocation success 100.00 % 100.00 % 1
Allocations - Deallocation success 100.00 % 100.00 % 1
Allocations - Pre-fail Allocations 100.00 % 100.00 % 1
Allocations - Average Allocation time 5748.52 Ticks (±857.55 Ticks) 4850.42 Ticks (±182.11 Ticks) 1.19
Allocations - Average Allocation time (no fail) 5748.52 Ticks (±857.55 Ticks) 4850.42 Ticks (±182.11 Ticks) 1.19
Allocations - Average Deallocation time 870.33 Ticks (±172.22 Ticks) 703.38 Ticks (±17.35 Ticks) 1.24
mutex_benchmark Build Time 94.20 s 94.72 s 0.99
mutex_benchmark File Size 0.97 MB 0.97 MB 1.00
Mutex Stress Test Average Time per Iteration - 1 Threads 12.62 ns (±0.63 ns) 12.52 ns (±0.57 ns) 1.01
Mutex Stress Test Average Time per Iteration - 2 Threads 13.06 ns (±0.73 ns) 13.00 ns (±0.92 ns) 1.00

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

@fogti fogti force-pushed the path branch 2 times, most recently from ddbba05 to 6c0b8d6 Compare January 14, 2026 11:46
prefix: Option<String>,
attr: FileAttr,
original_prefix: Arc<str>,
prefix: String,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It might be a good idea to instead only store the part in prefix that is actually "beyond" original_prefix.

@fogti fogti force-pushed the path branch 2 times, most recently from 72534ff to ba1d3f4 Compare January 27, 2026 14:08
Comment on lines +1167 to +1179
let mut prefix = self.prefix.clone();
// this part prevents inserting double-slashes or no slashes between prefix and path
if !path.is_empty() {
if let Some(x) = path.strip_prefix("/") {
path = x;
} else {
return Err(Errno::Nosys);
}
if !prefix.is_empty() {
prefix.push('/');
}
}
prefix.push_str(path);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is new, and should be specifically reviewed.

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.

2 participants