scenario3: increase limit in python

This commit is contained in:
illustris 2026-01-11 05:31:06 +05:30
parent 658f4e98bc
commit 25f47e017d
Signed by: illustris
GPG Key ID: 56C8FC0B899FEFA3

View File

@ -91,9 +91,9 @@ def main():
t_buf = benchmark("Buffered (64KB chunks)", read_buffered, filename) t_buf = benchmark("Buffered (64KB chunks)", read_buffered, filename)
t_byte_buf = benchmark("Byte-by-byte (buffered file)", read_byte_by_byte_buffered, filename) t_byte_buf = benchmark("Byte-by-byte (buffered file)", read_byte_by_byte_buffered, filename)
# Only run unbuffered test if file is small (< 100KB) # Only run unbuffered test if file is small (< 2M)
file_size = os.path.getsize(filename) file_size = os.path.getsize(filename)
if file_size < 100_000: if file_size < 2_000_000:
t_unbuf = benchmark("Unbuffered (raw syscalls)", read_unbuffered, filename) t_unbuf = benchmark("Unbuffered (raw syscalls)", read_unbuffered, filename)
print(f"\nSpeedup (buffered vs unbuffered): {t_unbuf/t_buf:.1f}x") print(f"\nSpeedup (buffered vs unbuffered): {t_unbuf/t_buf:.1f}x")
else: else: