Skip to content

socket: recv: use method from tcp library#2456

Open
zyuiop wants to merge 1 commit into
hermit-os:mainfrom
zyuiop:fix/ip-use-native-func
Open

socket: recv: use method from tcp library#2456
zyuiop wants to merge 1 commit into
hermit-os:mainfrom
zyuiop:fix/ip-use-native-func

Conversation

@zyuiop
Copy link
Copy Markdown
Contributor

@zyuiop zyuiop commented Jun 1, 2026

I have this in my pile, and looking at the source code from smoltcp, it seems slightly different. Do we know if the current code is here for some kind of optimization? Copying seems a bit heavier than needed?

Copy link
Copy Markdown

@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: dc2dc9c Previous: a025f19 Performance Ratio
startup_benchmark Build Time 108.51 s 116.82 s 0.93
startup_benchmark File Size 0.77 MB 0.77 MB 1.00
Startup Time - 1 core 0.99 s (±0.04 s) 1.00 s (±0.03 s) 0.99
Startup Time - 2 cores 1.04 s (±0.06 s) 1.04 s (±0.05 s) 1.00
Startup Time - 4 cores 1.02 s (±0.03 s) 1.02 s (±0.05 s) 0.99
multithreaded_benchmark Build Time 107.39 s 117.48 s 0.91
multithreaded_benchmark File Size 0.84 MB 0.84 MB 1.00
Multithreaded Pi Efficiency - 2 Threads 90.97 % (±13.37 %) 85.06 % (±19.28 %) 1.07
Multithreaded Pi Efficiency - 4 Threads 44.77 % (±6.36 %) 42.20 % (±9.32 %) 1.06
Multithreaded Pi Efficiency - 8 Threads 24.25 % (±3.27 %) 23.57 % (±5.00 %) 1.03
micro_benchmarks Build Time 95.88 s 92.09 s 1.04
micro_benchmarks File Size 0.84 MB 0.84 MB 1.00
Scheduling time - 1 thread 71.68 ticks (±3.66 ticks) 73.19 ticks (±3.39 ticks) 0.98
Scheduling time - 2 threads 42.74 ticks (±6.84 ticks) 44.10 ticks (±6.54 ticks) 0.97
Micro - Time for syscall (getpid) 3.08 ticks (±0.25 ticks) 3.09 ticks (±0.16 ticks) 1.00
Memcpy speed - (built_in) block size 4096 74582.64 MByte/s (±51590.64 MByte/s) 73877.55 MByte/s (±50900.64 MByte/s) 1.01
Memcpy speed - (built_in) block size 1048576 29419.10 MByte/s (±24141.81 MByte/s) 29621.41 MByte/s (±24412.82 MByte/s) 0.99
Memcpy speed - (built_in) block size 16777216 23980.80 MByte/s (±19731.79 MByte/s) 26615.80 MByte/s (±21973.01 MByte/s) 0.90
Memset speed - (built_in) block size 4096 75049.98 MByte/s (±51934.09 MByte/s) 74082.46 MByte/s (±51039.25 MByte/s) 1.01
Memset speed - (built_in) block size 1048576 30185.46 MByte/s (±24582.65 MByte/s) 30381.08 MByte/s (±24836.90 MByte/s) 0.99
Memset speed - (built_in) block size 16777216 24732.45 MByte/s (±20247.72 MByte/s) 27365.04 MByte/s (±22427.19 MByte/s) 0.90
Memcpy speed - (rust) block size 4096 66318.28 MByte/s (±46260.87 MByte/s) 67998.13 MByte/s (±47775.53 MByte/s) 0.98
Memcpy speed - (rust) block size 1048576 29426.96 MByte/s (±24174.79 MByte/s) 29415.03 MByte/s (±24216.28 MByte/s) 1.00
Memcpy speed - (rust) block size 16777216 24373.79 MByte/s (±20163.77 MByte/s) 26645.15 MByte/s (±21980.78 MByte/s) 0.91
Memset speed - (rust) block size 4096 66765.83 MByte/s (±46547.50 MByte/s) 68410.01 MByte/s (±48051.67 MByte/s) 0.98
Memset speed - (rust) block size 1048576 30195.74 MByte/s (±24624.43 MByte/s) 30182.39 MByte/s (±24662.20 MByte/s) 1.00
Memset speed - (rust) block size 16777216 24996.29 MByte/s (±20531.79 MByte/s) 27320.66 MByte/s (±22364.88 MByte/s) 0.91
alloc_benchmarks Build Time 92.41 s 91.56 s 1.01
alloc_benchmarks File Size 0.85 MB 0.85 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 4561.29 Ticks (±647.10 Ticks) 4553.50 Ticks (±57.46 Ticks) 1.00
Allocations - Average Allocation time (no fail) 4561.29 Ticks (±647.10 Ticks) 4553.50 Ticks (±57.46 Ticks) 1.00
Allocations - Average Deallocation time 691.75 Ticks (±94.40 Ticks) 1035.15 Ticks (±129.57 Ticks) 0.67
mutex_benchmark Build Time 92.35 s 88.37 s 1.04
mutex_benchmark File Size 0.84 MB 0.84 MB 1.00
Mutex Stress Test Average Time per Iteration - 1 Threads 13.48 ns (±0.57 ns) 14.02 ns (±0.84 ns) 0.96
Mutex Stress Test Average Time per Iteration - 2 Threads 19.64 ns (±12.65 ns) 17.80 ns (±4.95 ns) 1.10

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

@mkroening mkroening self-assigned this Jun 1, 2026
@mkroening mkroening self-requested a review June 1, 2026 19:29
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