BobTheBuidler
faster-hexbytes
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
perf: avoid hex round-trip for int to bytes
#74
Merged
Comparing
perf/int-to-bytes-fastpath
(
de8c2ea
) with
master
(
df1c636
)
CodSpeed Performance Gauge
×2.3
Improvement
18
Untouched
601
No successful run was found on
master
(
b15b54f
) during the generation of this report, so
df1c636
was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.
Benchmarks
Mode
CPU Simulation
Wall Time
Memory
Status
Improvement
Untouched
619 total
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_to_bytes[2**8]
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
×2.3
196.8 µs
87 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_to_bytes[123456]
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
×2.3
199.4 µs
88.4 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_to_bytes[2**16]
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
×2.3
199.3 µs
88.5 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_to_bytes[0]
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
×2.1
180.5 µs
84.7 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_to_bytes[2**64]
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
×2.1
217.1 µs
102.9 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_to_bytes[2**32]
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
×2.1
213.8 µs
101.5 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_to_bytes[2**256-1]
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
×2
225.7 µs
111.3 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexbytes_new[2**8]
benchmarks/test_main_benchmarks.py
CodSpeed Performance Gauge
+60%
305.8 µs
191 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexbytes_new[123456]
benchmarks/test_main_benchmarks.py
CodSpeed Performance Gauge
+60%
307.7 µs
192.4 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexbytes_new[2**16]
benchmarks/test_main_benchmarks.py
CodSpeed Performance Gauge
+60%
307.6 µs
192.4 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexbytes_new[2**32]
benchmarks/test_main_benchmarks.py
CodSpeed Performance Gauge
+57%
322.4 µs
205.4 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexbytes_new[2**64]
benchmarks/test_main_benchmarks.py
CodSpeed Performance Gauge
+57%
327.2 µs
208.5 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexbytes_new[2**256-1]
benchmarks/test_main_benchmarks.py
CodSpeed Performance Gauge
+54%
333.1 µs
216.8 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexbytes_new[0]
benchmarks/test_main_benchmarks.py
CodSpeed Performance Gauge
+52%
287.5 µs
188.7 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexstr_to_bytes['']
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
+24%
73.8 µs
59.3 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexstr_to_bytes['0x']
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
+24%
75 µs
60.6 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_to_bytes['']
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
+23%
77.2 µs
62.7 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_to_bytes['0x']
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
+22%
78.4 µs
64.1 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexbytes_new['']
benchmarks/test_main_benchmarks.py
CodSpeed Performance Gauge
+9%
182.2 µs
166.9 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexbytes_new['0x']
benchmarks/test_main_benchmarks.py
CodSpeed Performance Gauge
+9%
183.8 µs
169.1 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_to_bytes[bytearray(long alternating)]
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
+6%
111 µs
104.6 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_to_bytes[bytearray(b'\\x01'*2048)]
benchmarks/test__utils_benchmarks.py
CodSpeed Performance Gauge
+6%
116.6 µs
109.9 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexbytes_new[b'a'*1024]
benchmarks/test_main_benchmarks.py
CodSpeed Performance Gauge
+4%
166.1 µs
159.6 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexbytes_getitem_slice[slice(None,None)-b'a'*1024]
benchmarks/test_main_benchmarks.py
CodSpeed Performance Gauge
+1%
331.5 µs
327.3 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_faster_hexbytes_getitem_slice[slice(None,None)-all byte values]
benchmarks/test_main_benchmarks.py
CodSpeed Performance Gauge
+1%
296.2 µs
293.1 µs
1
2
3
4
5
...
25
Commits
Click on a commit to change the comparison range
Base
master
df1c636
×2.3
perf: avoid hex round-trip for int to bytes
de8c2ea
3 months ago
by BobTheBuidler
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs