Skip to content

refactor(fs): implement ObjectInterface without inner lock#2295

Open
mkroening wants to merge 5 commits intomainfrom
embedded-io-async
Open

refactor(fs): implement ObjectInterface without inner lock#2295
mkroening wants to merge 5 commits intomainfrom
embedded-io-async

Conversation

@mkroening
Copy link
Member

This PR does to file handles what #1900 did to sockets.

@mkroening mkroening self-assigned this Mar 4, 2026
Copy link

@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: 8c7cdcf Previous: f844e66 Performance Ratio
startup_benchmark Build Time 92.12 s 88.06 s 1.05
startup_benchmark File Size 0.86 MB 0.86 MB 1.00
Startup Time - 1 core 0.94 s (±0.03 s) 0.95 s (±0.03 s) 0.99
Startup Time - 2 cores 0.96 s (±0.03 s) 0.95 s (±0.03 s) 1.00
Startup Time - 4 cores 0.96 s (±0.04 s) 0.96 s (±0.02 s) 1.00
multithreaded_benchmark Build Time 90.22 s 85.89 s 1.05
multithreaded_benchmark File Size 0.95 MB 0.96 MB 1.00
Multithreaded Pi Efficiency - 2 Threads 90.46 % (±8.07 %) 89.83 % (±7.78 %) 1.01
Multithreaded Pi Efficiency - 4 Threads 44.92 % (±3.19 %) 45.10 % (±2.78 %) 1.00
Multithreaded Pi Efficiency - 8 Threads 25.90 % (±1.77 %) 26.10 % (±1.79 %) 0.99
micro_benchmarks Build Time 97.95 s 93.47 s 1.05
micro_benchmarks File Size 0.96 MB 0.97 MB 1.00
Scheduling time - 1 thread 73.04 ticks (±4.09 ticks) 70.13 ticks (±3.69 ticks) 1.04
Scheduling time - 2 threads 38.64 ticks (±4.29 ticks) 39.23 ticks (±4.37 ticks) 0.98
Micro - Time for syscall (getpid) 3.86 ticks (±0.34 ticks) 3.03 ticks (±0.32 ticks) 1.27
Memcpy speed - (built_in) block size 4096 62679.14 MByte/s (±44625.19 MByte/s) 64126.43 MByte/s (±45805.51 MByte/s) 0.98
Memcpy speed - (built_in) block size 1048576 30147.99 MByte/s (±25213.58 MByte/s) 29755.52 MByte/s (±24573.70 MByte/s) 1.01
Memcpy speed - (built_in) block size 16777216 22446.56 MByte/s (±18885.90 MByte/s) 28168.79 MByte/s (±23457.37 MByte/s) 0.80
Memset speed - (built_in) block size 4096 62995.20 MByte/s (±44795.90 MByte/s) 65220.18 MByte/s (±46530.82 MByte/s) 0.97
Memset speed - (built_in) block size 1048576 30955.91 MByte/s (±25660.81 MByte/s) 30524.26 MByte/s (±25011.49 MByte/s) 1.01
Memset speed - (built_in) block size 16777216 23167.27 MByte/s (±19381.25 MByte/s) 28932.86 MByte/s (±23894.16 MByte/s) 0.80
Memcpy speed - (rust) block size 4096 58086.71 MByte/s (±42770.93 MByte/s) 61627.83 MByte/s (±45481.78 MByte/s) 0.94
Memcpy speed - (rust) block size 1048576 30164.63 MByte/s (±25324.29 MByte/s) 29753.89 MByte/s (±24597.71 MByte/s) 1.01
Memcpy speed - (rust) block size 16777216 21550.18 MByte/s (±18083.80 MByte/s) 28167.72 MByte/s (±23475.41 MByte/s) 0.77
Memset speed - (rust) block size 4096 58565.55 MByte/s (±43030.56 MByte/s) 62678.13 MByte/s (±46150.29 MByte/s) 0.93
Memset speed - (rust) block size 1048576 30960.71 MByte/s (±25776.82 MByte/s) 30571.29 MByte/s (±25061.93 MByte/s) 1.01
Memset speed - (rust) block size 16777216 22260.34 MByte/s (±18582.20 MByte/s) 28951.95 MByte/s (±23931.75 MByte/s) 0.77
alloc_benchmarks Build Time 94.71 s 93.07 s 1.02
alloc_benchmarks File Size 0.93 MB 0.93 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 11132.97 Ticks (±309.80 Ticks) 10917.65 Ticks (±165.16 Ticks) 1.02
Allocations - Average Allocation time (no fail) 11132.97 Ticks (±309.80 Ticks) 10917.65 Ticks (±165.16 Ticks) 1.02
Allocations - Average Deallocation time 2316.08 Ticks (±1564.30 Ticks) 1442.60 Ticks (±1106.54 Ticks) 1.61
mutex_benchmark Build Time 95.45 s 91.11 s 1.05
mutex_benchmark File Size 0.96 MB 0.96 MB 1.00
Mutex Stress Test Average Time per Iteration - 1 Threads 13.72 ns (±0.66 ns) 13.02 ns (±0.76 ns) 1.05
Mutex Stress Test Average Time per Iteration - 2 Threads 23.48 ns (±14.26 ns) 21.94 ns (±16.80 ns) 1.07

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

@fogti
Copy link
Contributor

fogti commented Mar 6, 2026

This is nice to see.

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