Generated on 2025-05-05 04:54:08
Property | Value |
---|---|
OS | Darwin |
OS Version | 23.5.0 |
Architecture | arm64 |
Python Version | 3.12.2 |
Date | 2025-05-05 04:54:08 |
CPU | Apple M1 |
This benchmark report compares different implementations of the 'slice' utility, with a focus on comparing the C implementations (slice1.c, slice2.c, and slice3.c).
Scenario | Fastest Implementation | Avg. Time (s) | Throughput (MB/s) |
---|---|---|---|
full_file | C-slice3 | 0.006108 | 3884.64 |
large_chunk | C-slice3 | 0.004951 | 4039.91 |
small_start | C-slice3 | 0.003196 | 313.11 |
The benchmark compares three C implementations:
File Size (MB) | C-slice1 (s) | C-slice2 (s) | C-slice3 (s) |
---|---|---|---|
1 | 0.007074 | 0.004507 | 0.004864 |
5 | 0.009209 | 0.003978 | 0.003536 |
10 | 0.017107 | 0.004834 | 0.004066 |
20 | 0.041724 | 0.006553 | 0.005189 |
50 | 0.065837 | 0.010855 | 0.007451 |
100 | 0.148108 | 0.018468 | 0.011542 |
File Size (MB) | C-slice1 (s) | C-slice2 (s) | C-slice3 (s) |
---|---|---|---|
5 | 0.006980 | 0.003222 | 0.003217 |
10 | 0.004742 | 0.003307 | 0.003050 |
20 | 0.007412 | 0.003502 | 0.003278 |
50 | 0.006365 | 0.003358 | 0.003283 |
100 | 0.008634 | 0.003451 | 0.003153 |
File Size (MB) | C-slice1 (s) | C-slice2 (s) | C-slice3 (s) |
---|---|---|---|
50 | 0.039727 | 0.006393 | 0.005018 |
100 | 0.041164 | 0.006194 | 0.004885 |
impl | scenario | file_size_MB | start_offset | slice_size | iterations | avg_time | min_time | max_time | stdev | throughput_MBps |
---|---|---|---|---|---|---|---|---|---|---|
C-slice1 | full_file | 1 | 0 | 1048564 | 5 | 0.007074 | 0.003532 | 0.020089 | 0.007278 | 141.361119 |
C-slice2 | full_file | 1 | 0 | 1048564 | 5 | 0.004507 | 0.003759 | 0.005731 | 0.000952 | 221.874541 |
C-slice3 | full_file | 1 | 0 | 1048564 | 5 | 0.004864 | 0.003314 | 0.009182 | 0.002492 | 205.589752 |
Go | full_file | 1 | 0 | 1048564 | 5 | 0.005895 | 0.004075 | 0.011783 | 0.003305 | 169.633343 |
Python | full_file | 1 | 0 | 1048564 | 5 | 0.024427 | 0.022679 | 0.029014 | 0.002755 | 40.937837 |
Ruby | full_file | 1 | 0 | 1048564 | 5 | 0.049139 | 0.038352 | 0.087905 | 0.021682 | 20.350202 |
Shell | full_file | 1 | 0 | 1048564 | 5 | 1.135014 | 1.098187 | 1.201039 | 0.042428 | 0.881036 |
C-slice1 | small_start | 5 | 0 | 1048576 | 5 | 0.006980 | 0.002978 | 0.022489 | 0.008671 | 143.266476 |
C-slice2 | small_start | 5 | 0 | 1048576 | 5 | 0.003222 | 0.002937 | 0.003996 | 0.000445 | 310.366232 |
C-slice3 | small_start | 5 | 0 | 1048576 | 5 | 0.003217 | 0.002829 | 0.004143 | 0.000547 | 310.848617 |
Go | small_start | 5 | 0 | 1048576 | 5 | 0.003780 | 0.003594 | 0.004086 | 0.000214 | 264.550265 |
Python | small_start | 5 | 0 | 1048576 | 5 | 0.020993 | 0.020825 | 0.021089 | 0.000117 | 47.634926 |
Ruby | small_start | 5 | 0 | 1048576 | 5 | 0.039839 | 0.036753 | 0.050483 | 0.005966 | 25.101032 |
Shell | small_start | 5 | 0 | 1048576 | 5 | 1.099666 | 1.086396 | 1.109370 | 0.009182 | 0.909367 |
C-slice1 | full_file | 5 | 0 | 5242864 | 5 | 0.009209 | 0.004151 | 0.029244 | 0.011199 | 542.945460 |
C-slice2 | full_file | 5 | 0 | 5242864 | 5 | 0.003978 | 0.003814 | 0.004062 | 0.000099 | 1256.909186 |
C-slice3 | full_file | 5 | 0 | 5242864 | 5 | 0.003536 | 0.003377 | 0.003687 | 0.000136 | 1414.022834 |
Go | full_file | 5 | 0 | 5242864 | 5 | 0.004865 | 0.004754 | 0.005045 | 0.000112 | 1027.746093 |
Python | full_file | 5 | 0 | 5242864 | 5 | 0.021809 | 0.021639 | 0.021938 | 0.000122 | 229.262449 |
Ruby | full_file | 5 | 0 | 5242864 | 5 | 0.038637 | 0.037219 | 0.041942 | 0.001887 | 129.409238 |
Showing 20 rows out of 91 total. See the CSV file for complete data.
Based on the benchmark results, we can draw the following conclusions:
Report generated automatically by slice/bench/generate_report.py