Avatar for the BobTheBuidler user
BobTheBuidler
evmspec
BlogDocsChangelog

perf: skip HexBytes allocation for int indexing

#257Merged
Comparing
perf/hexbytes-getitem-20260128074048
(
8e5f02e
) with
master
(
29b107e
)
CodSpeed Performance Gauge
×2.1
Improvement
12
Untouched
233
Skipped
20

Benchmarks

265 total
test_hexbytes32_getitem_int[first-all-zero]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
×2.1
651.1 ms307.4 ms
test_hexbytes32_getitem_int[last-all-zero]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
×2.1
650.7 ms307.4 ms
test_hexbytes32_getitem_int[first-hash]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
×2.1
650.6 ms307.4 ms
test_hexbytes32_getitem_int[last-hash]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
×2.1
650.3 ms307.4 ms
test_hexbytes32_getitem_int[last-address-topic]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
×2.1
650.3 ms307.4 ms
test_hexbytes32_getitem_int[first-address-topic]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
×2.1
650.3 ms307.4 ms
test_hexbytes32_getitem_int[middle-all-zero]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
×2.1
650.3 ms307.4 ms
test_hexbytes32_getitem_int[last-padded-small]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
×2.1
650 ms307.4 ms
test_hexbytes32_getitem_int[middle-padded-small]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
×2.1
650 ms307.4 ms
test_hexbytes32_getitem_int[first-padded-small]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
×2.1
650 ms307.4 ms
test_hexbytes32_getitem_int[middle-address-topic]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
×2.1
650 ms307.4 ms
test_hexbytes32_getitem_int[middle-hash]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
×2.1
650 ms307.4 ms
test_hexbytes32_construct[all-zero]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
+1%
397.1 ms393.9 ms
test_status_enum[hex-upper-failure]
benchmarks/test_enum_benchmarks.py
CodSpeed Performance Gauge
+1%
65.1 ms64.6 ms
test_uints_construct[uint184-zero]
benchmarks/test_uints_benchmarks.py
CodSpeed Performance Gauge
+1%
171.5 ms170.2 ms
test_uints_construct[uint120-zero]
benchmarks/test_uints_benchmarks.py
CodSpeed Performance Gauge
+1%
171.5 ms170.2 ms
test_hexbytes32_new_function[hexstr-no-prefix]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
+1%
300.3 ms298.2 ms
test_uints_construct[uint24-zero]
benchmarks/test_uints_benchmarks.py
CodSpeed Performance Gauge
+1%
171.3 ms170.1 ms
test_uints_construct[uint48-zero]
benchmarks/test_uints_benchmarks.py
CodSpeed Performance Gauge
+1%
171.3 ms170.2 ms
test_uints_construct[uint40-zero]
benchmarks/test_uints_benchmarks.py
CodSpeed Performance Gauge
+1%
171.3 ms170.2 ms
test_uints_construct[uint136-zero]
benchmarks/test_uints_benchmarks.py
CodSpeed Performance Gauge
+1%
171.3 ms170.2 ms
test_uints_construct[uint224-zero]
benchmarks/test_uints_benchmarks.py
CodSpeed Performance Gauge
+1%
171.2 ms170.2 ms
test_uints_construct[uint144-zero]
benchmarks/test_uints_benchmarks.py
CodSpeed Performance Gauge
+1%
171.2 ms170.2 ms
test_uints_construct[uint248-zero]
benchmarks/test_uints_benchmarks.py
CodSpeed Performance Gauge
+1%
171.2 ms170.2 ms
test_hexbytes32_construct[bytes]
benchmarks/test_hexbytes_benchmarks.py
CodSpeed Performance Gauge
+1%
255.1 ms253.7 ms

Commits

Click on a commit to change the comparison range
Base
master
29b107e
×2.1
perf: avoid HexBytes allocation for faster indexing
8e5f02e
1 day ago
by BobTheBuidler
© 2026 CodSpeed Technology
Home Terms Privacy Docs