Skip to content

perf: use librt BytesWriter for faster small ints#109

Closed
BobTheBuidler wants to merge 4 commits into
masterfrom
perf/librt-byteswriter-small-int
Closed

perf: use librt BytesWriter for faster small ints#109
BobTheBuidler wants to merge 4 commits into
masterfrom
perf/librt-byteswriter-small-int

Conversation

@BobTheBuidler
Copy link
Copy Markdown
Owner

Route single-byte integer conversion through librt BytesWriter while sending larger integers directly to the existing fallback path.

Route single-byte integer conversion through librt BytesWriter while sending larger integers directly to the existing fallback path, and add benchmark cases so CI can validate user-facing small integer HexBytes construction.
@BobTheBuidler BobTheBuidler force-pushed the perf/librt-byteswriter-small-int branch from 000ac25 to 6c181b8 Compare June 1, 2026 04:31
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 1, 2026

Merging this PR will not alter performance

✅ 623 untouched benchmarks


Comparing perf/librt-byteswriter-small-int (e52a575) with master (76d75cf)

Open in CodSpeed

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Pytest Benchmark Diff

faster_hexbytes._utils - view benchmarks

Function Reference Mean Faster Mean % Change Speedup (%) x Faster Faster
hexstr_to_bytes[''] 0.00017824694375778046 0.00006772750954601463 62.00% 163.18% 2.63x
hexstr_to_bytes['0x'] 0.00021199361051708326 0.0000643569735074015 69.64% 229.40% 3.29x
hexstr_to_bytes['0x'+'0'*128] 0.0003647010799681903 0.000203047226938572 44.33% 79.61% 1.80x
hexstr_to_bytes['0x'+'00'*64] 0.0003402229421429378 0.0002035767140783228 40.16% 67.12% 1.67x
hexstr_to_bytes['0x'+'00ff'*16] 0.000311305683289576 0.00017986796501188464 42.22% 73.07% 1.73x
hexstr_to_bytes['0x'+'0123456789abcdef'*8] 0.00033395376923050607 0.00020156843208869976 39.64% 65.68% 1.66x
hexstr_to_bytes['0x'+'1'*64] 0.00030837182152349034 0.00017984085716937247 41.68% 71.47% 1.71x
hexstr_to_bytes['0x'+'1234567890abcdef'*8] 0.0003374278671429138 0.00020086028154507165 40.47% 67.99% 1.68x
hexstr_to_bytes['0x'+'a'*128] 0.00033121653807553975 0.0002073916411044047 37.38% 59.71% 1.60x
hexstr_to_bytes['0x'+'a1b2c3d4'*8] 0.00031205265689064567 0.00018238961798790394 41.55% 71.09% 1.71x
hexstr_to_bytes['0x'+'b'*2048] 0.0013331550942146193 0.0011539774799529474 13.44% 15.53% 1.16x
hexstr_to_bytes['0x'+'badc0ffee0ddf00d'*4] 0.00030843883271274014 0.00017958823767049125 41.78% 71.75% 1.72x
hexstr_to_bytes['0x'+'beef'*16] 0.00031021788672168957 0.000180644900734038 41.77% 71.73% 1.72x
hexstr_to_bytes['0x'+'c'*1024] 0.0008310690989008978 0.000653138609581404 21.41% 27.24% 1.27x
hexstr_to_bytes['0x'+'cafebabe'*8] 0.00031467840146236074 0.0001801342360415368 42.76% 74.69% 1.75x
hexstr_to_bytes['0x'+'d'*512] 0.000548532296659291 0.0003814711266187349 30.46% 43.79% 1.44x
hexstr_to_bytes['0x'+'dead'*16] 0.00031180323069745483 0.00018067285635597167 42.06% 72.58% 1.73x
hexstr_to_bytes['0x'+'e'*256] 0.00041256399520527877 0.0002566293001547568 37.80% 60.76% 1.61x
hexstr_to_bytes['0x'+'f'*128] 0.0003362706241462122 0.00020187346832036817 39.97% 66.57% 1.67x
hexstr_to_bytes['0x'+'f'*64] 0.0003114251569078612 0.00017993469470929384 42.22% 73.08% 1.73x
hexstr_to_bytes['0x'+'facefeed'*8] 0.0003103833396696841 0.00017980510283850063 42.07% 72.62% 1.73x
hexstr_to_bytes['0x'+'ff'*32] 0.00030753748577686614 0.00018001364256666809 41.47% 70.84% 1.71x
hexstr_to_bytes['0x'+'ff00'*16] 0.00031230455678770715 0.00018121809553038522 41.97% 72.34% 1.72x
hexstr_to_bytes['0x0'] 0.0003074635840624241 0.000172994187532593 43.74% 77.73% 1.78x
hexstr_to_bytes['0x1'] 0.00030984234724534625 0.0001717583639848375 44.57% 80.39% 1.80x
hexstr_to_bytes['0x1234'] 0.00028863433556666144 0.00015683674069394892 45.66% 84.03% 1.84x
hexstr_to_bytes['0xabcdef'] 0.0002930372714210554 0.00015708914745128983 46.39% 86.54% 1.87x
hexstr_to_bytes['0xCAFEBABE'] 0.00028956005932665287 0.0001578878890317013 45.47% 83.40% 1.83x
hexstr_to_bytes['0xdeadbeef'] 0.0002897082000575275 0.00015911829025826412 45.08% 82.07% 1.82x
hexstr_to_bytes['deadbeef'] 0.00023409378730822127 0.00013942669238477267 40.44% 67.90% 1.68x
to_bytes[''] 0.0002859828824970705 0.00006853431167619037 76.04% 317.28% 4.17x
to_bytes['0x'] 0.00031805408617923575 0.00006467036626138192 79.67% 391.81% 4.92x
to_bytes['0x'+'00'*64] 0.0004470255564437362 0.0002077680071722129 53.52% 115.16% 2.15x
to_bytes['0x'+'a'*128] 0.0004380833268967648 0.0002017726408002895 53.94% 117.12% 2.17x
to_bytes['0x'+'ff'*32] 0.0004047838884378813 0.0001770185321797157 56.27% 128.67% 2.29x
to_bytes['0x1234'] 0.00039653305118889017 0.00015819193977052414 60.11% 150.67% 2.51x
to_bytes['0xabcdef'] 0.0003932323030901722 0.00015749604448649185 59.95% 149.68% 2.50x
to_bytes['0xCAFEBABE'] 0.00040173346236140105 0.0001569037493267967 60.94% 156.04% 2.56x
to_bytes['0xdeadbeef'] 0.0003997802285228614 0.00015807583954152563 60.46% 152.90% 2.53x
to_bytes['abc'] 0.00038043419591173803 0.000176178353660664 53.69% 115.94% 2.16x
to_bytes['deadbeef'] 0.00034039720153392457 0.00013990397740828718 58.90% 143.31% 2.43x
to_bytes[0-9] 0.00008025133436638232 0.00005046609436844017 37.11% 59.02% 1.59x
to_bytes[0] 0.0007498384708586966 0.00009126758034937529 87.83% 721.58% 8.22x
to_bytes[1] 0.0007489368532246623 0.00009012804629370214 87.97% 730.97% 8.31x
to_bytes[123456] 0.0007846081705548426 0.00010298598534000878 86.87% 661.86% 7.62x
to_bytes[2**16] 0.0007849839658730064 0.000103982608645329 86.75% 654.92% 7.55x
to_bytes[2**256-1] 0.0008168591588632871 0.00014138143297034623 82.69% 477.77% 5.78x
to_bytes[2**32] 0.0008058773948245101 0.00011689991125684823 85.49% 589.37% 6.89x
to_bytes[2**64] 0.0008165258418839946 0.00013286841182745586 83.73% 514.54% 6.15x
to_bytes[2**8] 0.0007797857970562351 0.0000995105086739109 87.24% 683.62% 7.84x
to_bytes[255] 0.0007311849218405539 0.00009388705195871606 87.16% 678.79% 7.79x
to_bytes[4-byte pattern] 0.00009615938171107487 0.00004910950538807578 48.93% 95.81% 1.96x
to_bytes[all byte values] 0.00008125636462486339 0.00005026485145500223 38.14% 61.66% 1.62x
to_bytes[alternating 0x00/0xff] 0.000080838441520225 0.000049661619148116915 38.57% 62.78% 1.63x
to_bytes[alternating 0xaa/0x55] 0.000080554179737394 0.00004917827693170896 38.95% 63.80% 1.64x
to_bytes[ascii sentence] 0.00008137157554917153 0.000049489509155898825 39.18% 64.42% 1.64x
to_bytes[b''] 0.00007671389115538475 0.00004929810366290145 35.74% 55.61% 1.56x
to_bytes[b'\\x00'*32] 0.00007854594135681193 0.00004934754654735178 37.17% 59.17% 1.59x
to_bytes[b'\\x00\\xff\\x00\\xff'] 0.00008149091618114123 0.00004934142006415855 39.45% 65.16% 1.65x
to_bytes[b'\\x01'*100] 0.00008125311443122969 0.000050480104655242234 37.87% 60.96% 1.61x
to_bytes[b'\\x01'*2048] 0.00008113784382263239 0.00004975896200737478 38.67% 63.06% 1.63x
to_bytes[b'\\x01\\x02\\x03'] 0.00007879479843303363 0.00004997862743853839 36.57% 57.66% 1.58x
to_bytes[b'\\x10\\x20\\x30\\x40\\x50'] 0.00008011448265756222 0.00005024688599344324 37.28% 59.44% 1.59x
to_bytes[b'\\x7f'*8] 0.00007816441504338827 0.00004975518150401966 36.35% 57.10% 1.57x
to_bytes[b'\\x80'*8] 0.00008028872879131923 0.00005051018977823147 37.09% 58.96% 1.59x
to_bytes[b'\\xde\\xad\\xbe\\xef'] 0.00008047988346019068 0.00004996543819930689 37.92% 61.07% 1.61x
to_bytes[b'\\xff'*64] 0.00007928260383438547 0.000050465376557563375 36.35% 57.10% 1.57x
to_bytes[b'a'*1024] 0.00007981301759674913 0.000049409250557818885 38.09% 61.53% 1.62x
to_bytes[b'abc'] 0.00007784445035142161 0.00005047293845478116 35.16% 54.23% 1.54x
to_bytes[bytearray(0-9)] 0.00030838328562884893 0.00014070645801527614 54.37% 119.17% 2.19x
to_bytes[bytearray(4-byte pattern)] 0.0002976222483620416 0.0001437008946611311 51.72% 107.11% 2.07x
to_bytes[bytearray(all byte values)] 0.00029743445424528886 0.00014028314178102504 52.84% 112.02% 2.12x
to_bytes[bytearray(alternating 0x00/0xff)] 0.0002975082432512669 0.00014031089740646749 52.84% 112.04% 2.12x
to_bytes[bytearray(alternating 0xaa/0x55)] 0.0002967874886362687 0.0001398273262308872 52.89% 112.25% 2.12x
to_bytes[bytearray(ascii sentence)] 0.00029844181717779216 0.0001422333944149906 52.34% 109.83% 2.10x
to_bytes[bytearray(b'')] 0.00027267282503432374 0.00012360858652375693 54.67% 120.59% 2.21x
to_bytes[bytearray(b'\\x00'*32)] 0.0002935996840463067 0.000142273855041505 51.54% 106.36% 2.06x
to_bytes[bytearray(b'\\x00\\xff\\x00\\xff')] 0.00029601180025213083 0.00014297260985224634 51.70% 107.04% 2.07x
to_bytes[bytearray(b'\\x01'*100)] 0.00029535191531060434 0.00013921812897606454 52.86% 112.15% 2.12x
to_bytes[bytearray(b'\\x01'*2048)] 0.00035769959942664727 0.00017961781811611551 49.79% 99.14% 1.99x
to_bytes[bytearray(b'\\x01\\x02\\x03')] 0.00029624306269996606 0.00014375457927467674 51.47% 106.08% 2.06x
to_bytes[bytearray(b'\\x10\\x20\\x30\\x40\\x50')] 0.0002965897732385143 0.00013952323716504695 52.96% 112.57% 2.13x
to_bytes[bytearray(b'\\x7f'*8)] 0.00029728877777795255 0.00014211737995361196 52.20% 109.19% 2.09x
to_bytes[bytearray(b'\\x80'*8)] 0.00029683183214062323 0.000144245192235647 51.41% 105.78% 2.06x
to_bytes[bytearray(b'\\xde\\xad\\xbe\\xef')] 0.00029508527418871524 0.00014440589332748 51.06% 104.34% 2.04x
to_bytes[bytearray(b'\\xff'*64)] 0.0003028046464379236 0.00014253750459629507 52.93% 112.44% 2.12x
to_bytes[bytearray(b'a'*1024)] 0.0003461581296361431 0.0001817014699192528 47.51% 90.51% 1.91x
to_bytes[bytearray(b'abc')] 0.00029129354008298726 0.0001455483057125578 50.03% 100.14% 2.00x
to_bytes[bytearray(long alternating)] 0.0003486504959774435 0.00018361389487428785 47.34% 89.88% 1.90x
to_bytes[bytearray(mixed pattern)] 0.0002968823835227226 0.00014491138970072444 51.19% 104.87% 2.05x
to_bytes[bytearray(multiples of 0x10)] 0.0002958111668139279 0.0001413468825563888 52.22% 109.28% 2.09x
to_bytes[bytearray(palindrome ascii)] 0.0002965557037597915 0.00014340615438103698 51.64% 106.79% 2.07x
to_bytes[bytearray(palindrome numeric)] 0.00029685680413801027 0.00014310985289004672 51.79% 107.43% 2.07x
to_bytes[bytearray(palindrome)] 0.00029640466255266725 0.0001419664338729252 52.10% 108.79% 2.09x
to_bytes[bytearray(repeated 0-9)] 0.0002971204020340079 0.0001433972668027986 51.74% 107.20% 2.07x
to_bytes[bytearray(single 0xff)] 0.00029970135419804235 0.00014476487419261885 51.70% 107.03% 2.07x
to_bytes[bytearray(single null byte)] 0.0002982111902627482 0.00014479598763225912 51.45% 105.95% 2.06x
to_bytes[bytearray(two patterns)] 0.0002960937458034573 0.000139773054089373 52.79% 111.84% 2.12x
to_bytes[False] 0.0002467231849005877 0.00005088637884541278 79.38% 384.85% 4.85x
to_bytes[long alternating] 0.00008142307204126759 0.000049594857926145456 39.09% 64.18% 1.64x
to_bytes[memoryview(0-9)] 0.00045443862238119523 0.00018202019130253414 59.95% 149.66% 2.50x
to_bytes[memoryview(4-byte pattern)] 0.00046334042133480414 0.0001763980450355822 61.93% 162.67% 2.63x
to_bytes[memoryview(all byte values)] 0.00045675239400948356 0.00017594926823153657 61.48% 159.59% 2.60x
to_bytes[memoryview(alternating 0x00/0xff)] 0.00045736576473372567 0.00018080120285990104 60.47% 152.97% 2.53x
to_bytes[memoryview(alternating 0xaa/0x55)] 0.0004509778599365411 0.00018044977800249991 59.99% 149.92% 2.50x
to_bytes[memoryview(ascii sentence)] 0.0004581398470701279 0.0001785283495832585 61.03% 156.62% 2.57x
to_bytes[memoryview(b'')] 0.00043878763623870994 0.00015893120284539859 63.78% 176.09% 2.76x
to_bytes[memoryview(b'\\x00'*32)] 0.0004541142576886085 0.00017931715896214335 60.51% 153.25% 2.53x
to_bytes[memoryview(b'\\x00\\xff\\x00\\xff')] 0.0004704406727623384 0.0001820372914221811 61.30% 158.43% 2.58x
to_bytes[memoryview(b'\\x01'*100)] 0.00045713721249392234 0.0001818995497595937 60.21% 151.31% 2.51x
to_bytes[memoryview(b'\\x01'*2048)] 0.0005047417289374748 0.00023158690489512431 54.12% 117.95% 2.18x
to_bytes[memoryview(b'\\x01\\x02\\x03')] 0.00045510036549837744 0.0001831870604263156 59.75% 148.43% 2.48x
to_bytes[memoryview(b'\\x10\\x20\\x30\\x40\\x50')] 0.0004606531178900361 0.00018210637658511283 60.47% 152.96% 2.53x
to_bytes[memoryview(b'\\x7f'*8)] 0.0004551441260849797 0.00018160253163877752 60.10% 150.63% 2.51x
to_bytes[memoryview(b'\\x80'*8)] 0.0004565246412945507 0.0001824052520425918 60.04% 150.28% 2.50x
to_bytes[memoryview(b'\\xde\\xad\\xbe\\xef')] 0.0004561669918221619 0.00018191063432565263 60.12% 150.76% 2.51x
to_bytes[memoryview(b'\\xff'*64)] 0.0004566474897958326 0.00017869256057910762 60.87% 155.55% 2.56x
to_bytes[memoryview(b'a'*1024)] 0.0004942318024875892 0.00022480096124222486 54.52% 119.85% 2.20x
to_bytes[memoryview(b'abc')] 0.0004619685955574089 0.0001826550027351397 60.46% 152.92% 2.53x
to_bytes[memoryview(long alternating)] 0.0004999406282566757 0.00023144306232150813 53.71% 116.01% 2.16x
to_bytes[memoryview(mixed pattern)] 0.00045757891121270765 0.00017717437131546969 61.28% 158.26% 2.58x
to_bytes[memoryview(multiples of 0x10)] 0.0004572759617137581 0.00018073281896570245 60.48% 153.01% 2.53x
to_bytes[memoryview(palindrome ascii)] 0.0004560341674291531 0.00017698004559604544 61.19% 157.68% 2.58x
to_bytes[memoryview(palindrome numeric)] 0.0004573846353829457 0.00017593542891526 61.53% 159.97% 2.60x
to_bytes[memoryview(palindrome)] 0.0004560858682525198 0.000180316017811413 60.46% 152.94% 2.53x
to_bytes[memoryview(repeated 0-9)] 0.0004585096681939486 0.00017840089001431358 61.09% 157.01% 2.57x
to_bytes[memoryview(single 0xff)] 0.00046287174499548003 0.00017856809069619444 61.42% 159.21% 2.59x
to_bytes[memoryview(single null byte)] 0.00045821052689182744 0.000177613746244635 61.24% 157.98% 2.58x
to_bytes[memoryview(two patterns)] 0.0004573054942999865 0.00017856603707689102 60.95% 156.10% 2.56x
to_bytes[mixed pattern] 0.00008349178023356622 0.0000488655259569285 41.47% 70.86% 1.71x
to_bytes[multiples of 0x10] 0.00008118147360118264 0.000050110784065809884 38.27% 62.00% 1.62x
to_bytes[palindrome ascii] 0.00008169188237271946 0.0000501841221162063 38.57% 62.78% 1.63x
to_bytes[palindrome numeric] 0.00008129551641591308 0.00004869694072246799 40.10% 66.94% 1.67x
to_bytes[palindrome] 0.00007943416056415191 0.00004974588558453941 37.37% 59.68% 1.60x
to_bytes[repeated 0-9] 0.00008079514340601276 0.00004874980517245824 39.66% 65.73% 1.66x
to_bytes[single 0xff] 0.00007872493264206853 0.00004723237809839963 40.00% 66.68% 1.67x
to_bytes[single null byte] 0.00007805060129814345 0.000048292253421752046 38.13% 61.62% 1.62x
to_bytes[True] 0.00024724084973140836 0.000051933464355117996 78.99% 376.07% 4.76x
to_bytes[two patterns] 0.0000818932700760052 0.00004827191341229127 41.06% 69.65% 1.70x

faster_hexbytes.main - view benchmarks

Function Reference Mean Faster Mean % Change Speedup (%) x Faster Faster
hexbytes_getitem_index[-1-0-9] 0.00024274722743912924 0.00024402983198894935 -0.53% -0.53% 0.99x
hexbytes_getitem_index[-1-4-byte pattern] 0.0002443588016582274 0.0002451778129012107 -0.34% -0.33% 1.00x
hexbytes_getitem_index[-1-all byte values] 0.00024388529793015247 0.0002454523250895358 -0.64% -0.64% 0.99x
hexbytes_getitem_index[-1-alternating 0x00/0xff] 0.0002386051979691528 0.00024424256487340894 -2.36% -2.31% 0.98x
hexbytes_getitem_index[-1-alternating 0xaa/0x55] 0.00024184824740232152 0.0002443088884787033 -1.02% -1.01% 0.99x
hexbytes_getitem_index[-1-ascii sentence] 0.0002424600638301363 0.00024568155984031433 -1.33% -1.31% 0.99x
hexbytes_getitem_index[-1-b'\\x00'*32] 0.00024105527142830824 0.00024494020793932957 -1.61% -1.59% 0.98x
hexbytes_getitem_index[-1-b'\\x00\\xff\\x00\\xff'] 0.00024030604542130233 0.00024670706866410476 -2.66% -2.59% 0.97x
hexbytes_getitem_index[-1-b'\\x01'*100] 0.00024221737781339675 0.00024353858849983086 -0.55% -0.54% 0.99x
hexbytes_getitem_index[-1-b'\\x01'*2048] 0.00024205226398973776 0.0002455777773265731 -1.46% -1.44% 0.99x
hexbytes_getitem_index[-1-b'\\x01\\x02\\x03'] 0.00024067479003330445 0.00024353739728717413 -1.19% -1.18% 0.99x
hexbytes_getitem_index[-1-b'\\x10\\x20\\x30\\x40\\x50'] 0.00024147766151260257 0.00024187077154886214 -0.16% -0.16% 1.00x
hexbytes_getitem_index[-1-b'\\x7f'*8] 0.00024155739656725093 0.0002467773401535137 -2.16% -2.12% 0.98x
hexbytes_getitem_index[-1-b'\\x80'*8] 0.00024126882840490966 0.0002443235293538248 -1.27% -1.25% 0.99x
hexbytes_getitem_index[-1-b'\\xde\\xad\\xbe\\xef'] 0.00024056261168555634 0.0002452658023083391 -1.96% -1.92% 0.98x
hexbytes_getitem_index[-1-b'\\xff'*64] 0.0002444070399412452 0.0002467263310111084 -0.95% -0.94% 0.99x
hexbytes_getitem_index[-1-b'a'*1024] 0.00024276881895244026 0.00024914959311710106 -2.63% -2.56% 0.97x
hexbytes_getitem_index[-1-b'abc'] 0.00024257470324881217 0.0002437243447772874 -0.47% -0.47% 1.00x
hexbytes_getitem_index[-1-long alternating] 0.0002413398393408029 0.0002451184224375983 -1.57% -1.54% 0.98x
hexbytes_getitem_index[-1-mixed pattern] 0.0002399570541716433 0.0002449609638515085 -2.09% -2.04% 0.98x
hexbytes_getitem_index[-1-multiples of 0x10] 0.0002428893738282055 0.00024474742890997207 -0.76% -0.76% 0.99x
hexbytes_getitem_index[-1-palindrome ascii] 0.0002426428741778502 0.00024473523259529084 -0.86% -0.85% 0.99x
hexbytes_getitem_index[-1-palindrome numeric] 0.00024049300194766652 0.00024421554713757813 -1.55% -1.52% 0.98x
hexbytes_getitem_index[-1-palindrome] 0.00024300469279262202 0.000247644299878758 -1.91% -1.87% 0.98x
hexbytes_getitem_index[-1-repeated 0-9] 0.0002446796030823656 0.00025410090242020014 -3.85% -3.71% 0.96x
hexbytes_getitem_index[-1-two patterns] 0.00024164093970128645 0.0002443201373726874 -1.11% -1.10% 0.99x
hexbytes_getitem_index[0-0-9] 0.0002373230335972145 0.00024427169115386494 -2.93% -2.84% 0.97x
hexbytes_getitem_index[0-4-byte pattern] 0.0002401301154030429 0.0002395199570495146 0.25% 0.25% 1.00x
hexbytes_getitem_index[0-all byte values] 0.00023949413786849804 0.0002389724185533429 0.22% 0.22% 1.00x
hexbytes_getitem_index[0-alternating 0x00/0xff] 0.00023700101924962555 0.0002388938097022217 -0.80% -0.79% 0.99x
hexbytes_getitem_index[0-alternating 0xaa/0x55] 0.00023647115625730826 0.00024255289334332145 -2.57% -2.51% 0.97x
hexbytes_getitem_index[0-ascii sentence] 0.00023355870293123934 0.00024096489009610306 -3.17% -3.07% 0.97x
hexbytes_getitem_index[0-b'\\x00'*32] 0.00023724258455217888 0.00024034840857358613 -1.31% -1.29% 0.99x
hexbytes_getitem_index[0-b'\\x00\\xff\\x00\\xff'] 0.0002392683924550901 0.00024270024052746545 -1.43% -1.41% 0.99x
hexbytes_getitem_index[0-b'\\x01'*100] 0.00023860739474901746 0.00024357958557238448 -2.08% -2.04% 0.98x
hexbytes_getitem_index[0-b'\\x01'*2048] 0.00023675231907898737 0.000241569061708023 -2.03% -1.99% 0.98x
hexbytes_getitem_index[0-b'\\x01\\x02\\x03'] 0.0002393824171977817 0.00024273278443743854 -1.40% -1.38% 0.99x
hexbytes_getitem_index[0-b'\\x10\\x20\\x30\\x40\\x50'] 0.00023920135199782984 0.00024007818343386216 -0.37% -0.37% 1.00x
hexbytes_getitem_index[0-b'\\x7f'*8] 0.00023729805582233847 0.00024318529017976982 -2.48% -2.42% 0.98x
hexbytes_getitem_index[0-b'\\x80'*8] 0.00023904692550380223 0.00024044340298187954 -0.58% -0.58% 0.99x
hexbytes_getitem_index[0-b'\\xde\\xad\\xbe\\xef'] 0.00023692652148627776 0.00024521813185508697 -3.50% -3.38% 0.97x
hexbytes_getitem_index[0-b'\\xff'*64] 0.00023748533246575228 0.00024250461108401392 -2.11% -2.07% 0.98x
hexbytes_getitem_index[0-b'a'*1024] 0.00023821897186932802 0.00024298179376632293 -2.00% -1.96% 0.98x
hexbytes_getitem_index[0-b'abc'] 0.00023752241466585785 0.0002446348284343441 -2.99% -2.91% 0.97x
hexbytes_getitem_index[0-long alternating] 0.00025481646620506456 0.00024239826663396662 4.87% 5.12% 1.05x
hexbytes_getitem_index[0-mixed pattern] 0.00022292156412062137 0.00024308850222715898 -9.05% -8.30% 0.92x
hexbytes_getitem_index[0-multiples of 0x10] 0.000236439495073723 0.00024758903699803353 -4.72% -4.50% 0.95x
hexbytes_getitem_index[0-palindrome ascii] 0.0002672378510878796 0.0002423820644810418 9.30% 10.25% 1.10x
hexbytes_getitem_index[0-palindrome numeric] 0.00023860888491934214 0.0002416457174127029 -1.27% -1.26% 0.99x
hexbytes_getitem_index[0-palindrome] 0.0002386902188564322 0.00024227572982786591 -1.50% -1.48% 0.99x
hexbytes_getitem_index[0-repeated 0-9] 0.00023379806088243564 0.00024218195255477624 -3.59% -3.46% 0.97x
hexbytes_getitem_index[0-single 0xff] 0.00024044787618048954 0.000245545010868794 -2.12% -2.08% 0.98x
hexbytes_getitem_index[0-single null byte] 0.000240933275822454 0.00024238354009757662 -0.60% -0.60% 0.99x
hexbytes_getitem_index[0-two patterns] 0.00023100239869867112 0.00024235886629104993 -4.92% -4.69% 0.95x
hexbytes_getitem_index[1-0-9] 0.00023167348287973078 0.00024127166939045552 -4.14% -3.98% 0.96x
hexbytes_getitem_index[1-4-byte pattern] 0.00023593706425457944 0.0002385359008604886 -1.10% -1.09% 0.99x
hexbytes_getitem_index[1-all byte values] 0.00023518342523335742 0.00023962304728463953 -1.89% -1.85% 0.98x
hexbytes_getitem_index[1-alternating 0x00/0xff] 0.0002332335234161764 0.00024147119759314434 -3.53% -3.41% 0.97x
hexbytes_getitem_index[1-alternating 0xaa/0x55] 0.00023247566184281005 0.00024080829591945836 -3.58% -3.46% 0.97x
hexbytes_getitem_index[1-ascii sentence] 0.00023388730995256118 0.00024098629483862305 -3.04% -2.95% 0.97x
hexbytes_getitem_index[1-b'\\x00'*32] 0.00023255327388169673 0.00024294217327327998 -4.47% -4.28% 0.96x
hexbytes_getitem_index[1-b'\\x00\\xff\\x00\\xff'] 0.00023215901620337866 0.00024034342411764187 -3.53% -3.41% 0.97x
hexbytes_getitem_index[1-b'\\x01'*100] 0.00023242413055727404 0.00024001308997545484 -3.27% -3.16% 0.97x
hexbytes_getitem_index[1-b'\\x01'*2048] 0.0002317985700513005 0.0002400614517239711 -3.56% -3.44% 0.97x
hexbytes_getitem_index[1-b'\\x01\\x02\\x03'] 0.00023398438424979416 0.00024333020159730552 -3.99% -3.84% 0.96x
hexbytes_getitem_index[1-b'\\x10\\x20\\x30\\x40\\x50'] 0.00023421684293834533 0.00023968389896501595 -2.33% -2.28% 0.98x
hexbytes_getitem_index[1-b'\\x7f'*8] 0.00023359020354352255 0.000240512607267307 -2.96% -2.88% 0.97x
hexbytes_getitem_index[1-b'\\x80'*8] 0.00022784071497445005 0.00024043189255229194 -5.53% -5.24% 0.95x
hexbytes_getitem_index[1-b'\\xde\\xad\\xbe\\xef'] 0.000233530460686363 0.00024086614484216412 -3.14% -3.05% 0.97x
hexbytes_getitem_index[1-b'\\xff'*64] 0.00023288748282955721 0.00024003164438486275 -3.07% -2.98% 0.97x
hexbytes_getitem_index[1-b'a'*1024] 0.00023272111006517306 0.0002396113512141154 -2.96% -2.88% 0.97x
hexbytes_getitem_index[1-b'abc'] 0.00023323814329266802 0.00024303583489618358 -4.20% -4.03% 0.96x
hexbytes_getitem_index[1-long alternating] 0.00023252730942227698 0.00024147972928860724 -3.85% -3.71% 0.96x
hexbytes_getitem_index[1-mixed pattern] 0.00023297766650842833 0.00024047849086105623 -3.22% -3.12% 0.97x
hexbytes_getitem_index[1-multiples of 0x10] 0.00023244832773093146 0.00024037110903245913 -3.41% -3.30% 0.97x
hexbytes_getitem_index[1-palindrome ascii] 0.00023267225011686451 0.00024145541061828613 -3.77% -3.64% 0.96x
hexbytes_getitem_index[1-palindrome numeric] 0.00023131689801403642 0.0002442388682150961 -5.59% -5.29% 0.95x
hexbytes_getitem_index[1-palindrome] 0.00023201580754830133 0.00024035180866355745 -3.59% -3.47% 0.97x
hexbytes_getitem_index[1-repeated 0-9] 0.00023218914215485174 0.0002412163872722854 -3.89% -3.74% 0.96x
hexbytes_getitem_index[1-two patterns] 0.00023234175164112592 0.00024421134505583057 -5.11% -4.86% 0.95x
hexbytes_getitem_index[2-0-9] 0.00023510425954587807 0.00024021718774825814 -2.17% -2.13% 0.98x
hexbytes_getitem_index[2-4-byte pattern] 0.00023719200278624677 0.00023923115347465295 -0.86% -0.85% 0.99x
hexbytes_getitem_index[2-all byte values] 0.00023765861702270205 0.00023741156239394455 0.10% 0.10% 1.00x
hexbytes_getitem_index[2-alternating 0x00/0xff] 0.0002342217514523631 0.00024045614979834425 -2.66% -2.59% 0.97x
hexbytes_getitem_index[2-alternating 0xaa/0x55] 0.00023548141615807402 0.00024189734904408907 -2.72% -2.65% 0.97x
hexbytes_getitem_index[2-ascii sentence] 0.0002384980154673577 0.00024271316334451373 -1.77% -1.74% 0.98x
hexbytes_getitem_index[2-b'\\x00'*32] 0.0002317980813761193 0.00024301376740363398 -4.84% -4.62% 0.95x
hexbytes_getitem_index[2-b'\\x00\\xff\\x00\\xff'] 0.00023213479092697961 0.00024188533946214338 -4.20% -4.03% 0.96x
hexbytes_getitem_index[2-b'\\x01'*100] 0.0002388775469630276 0.0002399313410800185 -0.44% -0.44% 1.00x
hexbytes_getitem_index[2-b'\\x01'*2048] 0.0002362896294003394 0.00024045868736580016 -1.76% -1.73% 0.98x
hexbytes_getitem_index[2-b'\\x01\\x02\\x03'] 0.00023145811155181434 0.00024412958343490124 -5.47% -5.19% 0.95x
hexbytes_getitem_index[2-b'\\x10\\x20\\x30\\x40\\x50'] 0.00023380564126913473 0.00024020582528351433 -2.74% -2.66% 0.97x
hexbytes_getitem_index[2-b'\\x7f'*8] 0.0002319148661452708 0.00023988143594252118 -3.44% -3.32% 0.97x
hexbytes_getitem_index[2-b'\\x80'*8] 0.00023496305329452112 0.00024068566336667897 -2.44% -2.38% 0.98x
hexbytes_getitem_index[2-b'\\xde\\xad\\xbe\\xef'] 0.00023154340090210236 0.0002433684866366095 -5.11% -4.86% 0.95x
hexbytes_getitem_index[2-b'\\xff'*64] 0.00023178729300469183 0.00024190833895421372 -4.37% -4.18% 0.96x
hexbytes_getitem_index[2-b'a'*1024] 0.00023270666565973686 0.00024148544670137042 -3.77% -3.64% 0.96x
hexbytes_getitem_index[2-b'abc'] 0.00023239692150993902 0.000243739843180375 -4.88% -4.65% 0.95x
hexbytes_getitem_index[2-long alternating] 0.00023369839284028337 0.0002390694781573885 -2.30% -2.25% 0.98x
hexbytes_getitem_index[2-mixed pattern] 0.00023221096920027104 0.00023614653778533657 -1.69% -1.67% 0.98x
hexbytes_getitem_index[2-multiples of 0x10] 0.00023398067238952818 0.0002418989035934538 -3.38% -3.27% 0.97x
hexbytes_getitem_index[2-palindrome ascii] 0.00023245588107981253 0.00023876597067319988 -2.71% -2.64% 0.97x
hexbytes_getitem_index[2-palindrome numeric] 0.0002337842929291996 0.00023711476678712045 -1.42% -1.40% 0.99x
hexbytes_getitem_index[2-palindrome] 0.00023167364974224647 0.000244578146677533 -5.57% -5.28% 0.95x
hexbytes_getitem_index[2-repeated 0-9] 0.0002339034018504549 0.0002373013061912843 -1.45% -1.43% 0.99x
hexbytes_getitem_index[2-two patterns] 0.00023200078302426297 0.00023408515347672564 -0.90% -0.89% 0.99x
hexbytes_getitem_index[3-0-9] 0.0002354789627875649 0.00024048920734463986 -2.13% -2.08% 0.98x
hexbytes_getitem_index[3-4-byte pattern] 0.00023825056660150586 0.00023955166511490053 -0.55% -0.54% 0.99x
hexbytes_getitem_index[3-all byte values] 0.00023911564452524383 0.00023868057581034294 0.18% 0.18% 1.00x
hexbytes_getitem_index[3-alternating 0x00/0xff] 0.00023607610417135703 0.0002403082970761022 -1.79% -1.76% 0.98x
hexbytes_getitem_index[3-alternating 0xaa/0x55] 0.0002421417965220977 0.0002396452682632534 1.03% 1.04% 1.01x
hexbytes_getitem_index[3-ascii sentence] 0.0002361577567124752 0.00024003652197908168 -1.64% -1.62% 0.98x
hexbytes_getitem_index[3-b'\\x00'*32] 0.0002316976491200599 0.00023857917182893757 -2.97% -2.88% 0.97x
hexbytes_getitem_index[3-b'\\x00\\xff\\x00\\xff'] 0.00023536387393260566 0.00023952744668642479 -1.77% -1.74% 0.98x
hexbytes_getitem_index[3-b'\\x01'*100] 0.00023649656320075453 0.00024227508964722806 -2.44% -2.39% 0.98x
hexbytes_getitem_index[3-b'\\x01'*2048] 0.0002356921296716625 0.0002381207153859707 -1.03% -1.02% 0.99x
hexbytes_getitem_index[3-b'\\x10\\x20\\x30\\x40\\x50'] 0.0002349676041230066 0.00024025848717365683 -2.25% -2.20% 0.98x
hexbytes_getitem_index[3-b'\\x7f'*8] 0.00023384377579891495 0.00023963205830549207 -2.48% -2.42% 0.98x
hexbytes_getitem_index[3-b'\\x80'*8] 0.00024282402028166005 0.00023915679423703353 1.51% 1.53% 1.02x
hexbytes_getitem_index[3-b'\\xde\\xad\\xbe\\xef'] 0.00023627455953805488 0.00023947985616973598 -1.36% -1.34% 0.99x
hexbytes_getitem_index[3-b'\\xff'*64] 0.00023479755331767737 0.00023956561802798007 -2.03% -1.99% 0.98x
hexbytes_getitem_index[3-b'a'*1024] 0.0002349200598909954 0.0002384498584923797 -1.50% -1.48% 0.99x
hexbytes_getitem_index[3-long alternating] 0.00023577719200362882 0.00023854272452274023 -1.17% -1.16% 0.99x
hexbytes_getitem_index[3-mixed pattern] 0.00023542265327397715 0.00024071046429395053 -2.25% -2.20% 0.98x
hexbytes_getitem_index[3-multiples of 0x10] 0.0002362912581413626 0.00024142498045971587 -2.17% -2.13% 0.98x
hexbytes_getitem_index[3-palindrome ascii] 0.00023655382607728898 0.00023764764885645463 -0.46% -0.46% 1.00x
hexbytes_getitem_index[3-palindrome numeric] 0.00023612743722111571 0.00024158052167472973 -2.31% -2.26% 0.98x
hexbytes_getitem_index[3-palindrome] 0.0002370776361154492 0.0002382702107094213 -0.50% -0.50% 0.99x
hexbytes_getitem_index[3-repeated 0-9] 0.00023731998304540685 0.00023848447499232424 -0.49% -0.49% 1.00x
hexbytes_getitem_index[3-two patterns] 0.00023622268871956352 0.00023850164761969364 -0.96% -0.96% 0.99x
hexbytes_getitem_index[4-0-9] 0.00023360764709949485 0.00023944781822568404 -2.50% -2.44% 0.98x
hexbytes_getitem_index[4-4-byte pattern] 0.0002370214651458563 0.00023419585951069458 1.19% 1.21% 1.01x
hexbytes_getitem_index[4-all byte values] 0.00023671429846249797 0.00023518936702682374 0.64% 0.65% 1.01x
hexbytes_getitem_index[4-alternating 0x00/0xff] 0.00023391361720542748 0.0002384670019917384 -1.95% -1.91% 0.98x
hexbytes_getitem_index[4-alternating 0xaa/0x55] 0.00023272496251958697 0.0002390601946246378 -2.72% -2.65% 0.97x
hexbytes_getitem_index[4-ascii sentence] 0.00023257002991697724 0.0002369467765128514 -1.88% -1.85% 0.98x
hexbytes_getitem_index[4-b'\\x00'*32] 0.000236088667611077 0.0002363940557300802 -0.13% -0.13% 1.00x
hexbytes_getitem_index[4-b'\\x01'*100] 0.00023293598181362625 0.00023733080395442601 -1.89% -1.85% 0.98x
hexbytes_getitem_index[4-b'\\x01'*2048] 0.0002337797529306582 0.00024165272043826015 -3.37% -3.26% 0.97x
hexbytes_getitem_index[4-b'\\x10\\x20\\x30\\x40\\x50'] 0.00023347229088813569 0.00023889632304164695 -2.32% -2.27% 0.98x
hexbytes_getitem_index[4-b'\\x7f'*8] 0.0002335073781116952 0.00023800378214652035 -1.93% -1.89% 0.98x
hexbytes_getitem_index[4-b'\\x80'*8] 0.00023390196162835356 0.0002398471993552469 -2.54% -2.48% 0.98x
hexbytes_getitem_index[4-b'\\xff'*64] 0.00023563741842828087 0.00023622540470534097 -0.25% -0.25% 1.00x
hexbytes_getitem_index[4-b'a'*1024] 0.000236459463111209 0.00023708296125421767 -0.26% -0.26% 1.00x
hexbytes_getitem_index[4-long alternating] 0.00023356098201284008 0.00024116828383360543 -3.26% -3.15% 0.97x
hexbytes_getitem_index[4-mixed pattern] 0.00023344503498241953 0.00023285483301591363 0.25% 0.25% 1.00x
hexbytes_getitem_index[4-multiples of 0x10] 0.00023324395889135516 0.00024290240651309058 -4.14% -3.98% 0.96x
hexbytes_getitem_index[4-palindrome ascii] 0.00023384283172042916 0.0002311824530849875 1.14% 1.15% 1.01x
hexbytes_getitem_index[4-palindrome numeric] 0.0002337186060906876 0.00023669002810275538 -1.27% -1.26% 0.99x
hexbytes_getitem_index[4-palindrome] 0.00023360030704653963 0.00023825773359625521 -1.99% -1.95% 0.98x
hexbytes_getitem_index[4-repeated 0-9] 0.00023202694300279833 0.00023644334315412054 -1.90% -1.87% 0.98x
hexbytes_getitem_index[4-two patterns] 0.00023286365552186653 0.00023508166993971695 -0.95% -0.94% 0.99x
hexbytes_getitem_index[5-0-9] 0.00023208520000167577 0.00023914945929932684 -3.04% -2.95% 0.97x
hexbytes_getitem_index[5-4-byte pattern] 0.00023693556385742098 0.00023690603689597708 0.01% 0.01% 1.00x
hexbytes_getitem_index[5-all byte values] 0.00023762330956412817 0.00023478448902926278 1.19% 1.21% 1.01x
hexbytes_getitem_index[5-alternating 0x00/0xff] 0.00023253228849335494 0.00023811940976781407 -2.40% -2.35% 0.98x
hexbytes_getitem_index[5-alternating 0xaa/0x55] 0.00023204148124049545 0.0002387145557185672 -2.88% -2.80% 0.97x
hexbytes_getitem_index[5-ascii sentence] 0.00023651539329334827 0.0002328513276384771 1.55% 1.57% 1.02x
hexbytes_getitem_index[5-b'\\x00'*32] 0.00023295007593970377 0.00023642436293504324 -1.49% -1.47% 0.99x
hexbytes_getitem_index[5-b'\\x01'*100] 0.00023310976307144198 0.00023515674468928835 -0.88% -0.87% 0.99x
hexbytes_getitem_index[5-b'\\x01'*2048] 0.00023202209138310317 0.0002384023604017215 -2.75% -2.68% 0.97x
hexbytes_getitem_index[5-b'\\x7f'*8] 0.00023281469574276266 0.00023616365406848203 -1.44% -1.42% 0.99x
hexbytes_getitem_index[5-b'\\x80'*8] 0.00023255835829824153 0.00023790969983065346 -2.30% -2.25% 0.98x
hexbytes_getitem_index[5-b'\\xff'*64] 0.0002348685999047489 0.00023515239756887002 -0.12% -0.12% 1.00x
hexbytes_getitem_index[5-b'a'*1024] 0.00023184810393771398 0.00023941296734060057 -3.26% -3.16% 0.97x
hexbytes_getitem_index[5-long alternating] 0.00023469402686078343 0.0002381742587228311 -1.48% -1.46% 0.99x
hexbytes_getitem_index[5-mixed pattern] 0.00023583600827405184 0.00023595569197226433 -0.05% -0.05% 1.00x
hexbytes_getitem_index[5-multiples of 0x10] 0.000233325586302983 0.00023736821061043885 -1.73% -1.70% 0.98x
hexbytes_getitem_index[5-palindrome ascii] 0.00023557268346749126 0.00023794375123719117 -1.01% -1.00% 0.99x
hexbytes_getitem_index[5-palindrome] 0.00023134483185417633 0.00023851588556708778 -3.10% -3.01% 0.97x
hexbytes_getitem_index[5-repeated 0-9] 0.00023532697906031145 0.00023558111581283543 -0.11% -0.11% 1.00x
hexbytes_getitem_index[5-two patterns] 0.0002357808404100733 0.00023624241594405985 -0.20% -0.20% 1.00x
hexbytes_getitem_slice[slice(-3,None)-0-9] 0.0007552087993723757 0.0005035078853484469 33.33% 49.99% 1.50x
hexbytes_getitem_slice[slice(-3,None)-4-byte pattern] 0.0007570370438813683 0.0005469708306221323 27.75% 38.41% 1.38x
hexbytes_getitem_slice[slice(-3,None)-all byte values] 0.0007561990794844683 0.0005033745292937258 33.43% 50.23% 1.50x
hexbytes_getitem_slice[slice(-3,None)-alternating 0x00/0xff] 0.0007564489354600619 0.0005002566924272985 33.87% 51.21% 1.51x
hexbytes_getitem_slice[slice(-3,None)-alternating 0xaa/0x55] 0.0007575083843159839 0.0005018777500002863 33.75% 50.93% 1.51x
hexbytes_getitem_slice[slice(-3,None)-ascii sentence] 0.0007501316787565844 0.0005077212014573875 32.32% 47.74% 1.48x
hexbytes_getitem_slice[slice(-3,None)-b''] 0.0007221344921448474 0.00048051879386421225 33.46% 50.28% 1.50x
hexbytes_getitem_slice[slice(-3,None)-b'\\x00'*32] 0.0007436681869656197 0.0005003741792331006 32.72% 48.62% 1.49x
hexbytes_getitem_slice[slice(-3,None)-b'\\x00\\xff\\x00\\xff'] 0.0007524823721115432 0.0004986749278508535 33.73% 50.90% 1.51x
hexbytes_getitem_slice[slice(-3,None)-b'\\x01'*100] 0.0007586815708683384 0.0005015183714156964 33.90% 51.28% 1.51x
hexbytes_getitem_slice[slice(-3,None)-b'\\x01'*2048] 0.0007511027515526659 0.0005357336623666368 28.67% 40.20% 1.40x
hexbytes_getitem_slice[slice(-3,None)-b'\\x01\\x02\\x03'] 0.0007477579563554077 0.0005052009305622402 32.44% 48.01% 1.48x
hexbytes_getitem_slice[slice(-3,None)-b'\\x10\\x20\\x30\\x40\\x50'] 0.0007540601318611407 0.0005008921703139416 33.57% 50.54% 1.51x
hexbytes_getitem_slice[slice(-3,None)-b'\\x7f'*8] 0.0007513019704961526 0.0005030006782126436 33.05% 49.36% 1.49x
hexbytes_getitem_slice[slice(-3,None)-b'\\x80'*8] 0.0007546848739412186 0.0005028066242400632 33.38% 50.09% 1.50x
hexbytes_getitem_slice[slice(-3,None)-b'\\xde\\xad\\xbe\\xef'] 0.0007533076096422293 0.000502950730153782 33.23% 49.78% 1.50x
hexbytes_getitem_slice[slice(-3,None)-b'\\xff'*64] 0.0007468755548739607 0.0004999952053956877 33.06% 49.38% 1.49x
hexbytes_getitem_slice[slice(-3,None)-b'a'*1024] 0.0007476060963770567 0.000506746013135917 32.22% 47.53% 1.48x
hexbytes_getitem_slice[slice(-3,None)-b'abc'] 0.0007524326481894316 0.0005078236600820059 32.51% 48.17% 1.48x
hexbytes_getitem_slice[slice(-3,None)-long alternating] 0.0007543396917082651 0.0005030797251743777 33.31% 49.94% 1.50x
hexbytes_getitem_slice[slice(-3,None)-mixed pattern] 0.0007519155270897317 0.0005006371153476612 33.42% 50.19% 1.50x
hexbytes_getitem_slice[slice(-3,None)-multiples of 0x10] 0.0007538367202842782 0.0005416284958103208 28.15% 39.18% 1.39x
hexbytes_getitem_slice[slice(-3,None)-palindrome ascii] 0.0007538091123962086 0.0005037686220548676 33.17% 49.63% 1.50x
hexbytes_getitem_slice[slice(-3,None)-palindrome numeric] 0.0007512601774695642 0.0005168914043759348 31.20% 45.34% 1.45x
hexbytes_getitem_slice[slice(-3,None)-palindrome] 0.0007500530992959223 0.0004994718256788652 33.41% 50.17% 1.50x
hexbytes_getitem_slice[slice(-3,None)-repeated 0-9] 0.0007742050902094686 0.0005062474294111654 34.61% 52.93% 1.53x
hexbytes_getitem_slice[slice(-3,None)-single 0xff] 0.000722341320588234 0.00048249104236042136 33.20% 49.71% 1.50x
hexbytes_getitem_slice[slice(-3,None)-single null byte] 0.000721675448963344 0.00048229334425799213 33.17% 49.63% 1.50x
hexbytes_getitem_slice[slice(-3,None)-two patterns] 0.0007584584744628435 0.0005050048681588608 33.42% 50.19% 1.50x
hexbytes_getitem_slice[slice(0,3)-0-9] 0.0007683983084485842 0.0005021878976315463 34.64% 53.01% 1.53x
hexbytes_getitem_slice[slice(0,3)-4-byte pattern] 0.0007682640656123846 0.0005065669954487273 34.06% 51.66% 1.52x
hexbytes_getitem_slice[slice(0,3)-all byte values] 0.0007708970188386107 0.0005064558969549377 34.30% 52.21% 1.52x
hexbytes_getitem_slice[slice(0,3)-alternating 0x00/0xff] 0.0007739349228930025 0.0005030072494955978 35.01% 53.86% 1.54x
hexbytes_getitem_slice[slice(0,3)-alternating 0xaa/0x55] 0.0007692011488507842 0.0005032222157250743 34.58% 52.86% 1.53x
hexbytes_getitem_slice[slice(0,3)-ascii sentence] 0.0007659415231851768 0.0005044239820674283 34.14% 51.84% 1.52x
hexbytes_getitem_slice[slice(0,3)-b''] 0.0007313740439563084 0.0004911854987871066 32.84% 48.90% 1.49x
hexbytes_getitem_slice[slice(0,3)-b'\\x00'*32] 0.0007625384021384276 0.000506729798159963 33.55% 50.48% 1.50x
hexbytes_getitem_slice[slice(0,3)-b'\\x00\\xff\\x00\\xff'] 0.000756653332586951 0.0005025635570189583 33.58% 50.56% 1.51x
hexbytes_getitem_slice[slice(0,3)-b'\\x01'*100] 0.0007672585034952588 0.0005045503552476409 34.24% 52.07% 1.52x
hexbytes_getitem_slice[slice(0,3)-b'\\x01'*2048] 0.0007694105786547182 0.0005042436470888108 34.46% 52.59% 1.53x
hexbytes_getitem_slice[slice(0,3)-b'\\x01\\x02\\x03'] 0.0007760900481380996 0.0005081267191318669 34.53% 52.74% 1.53x
hexbytes_getitem_slice[slice(0,3)-b'\\x10\\x20\\x30\\x40\\x50'] 0.0007629865968337556 0.0005037964836044842 33.97% 51.45% 1.51x
hexbytes_getitem_slice[slice(0,3)-b'\\x7f'*8] 0.0007649580884159669 0.0005041129271650033 34.10% 51.74% 1.52x
hexbytes_getitem_slice[slice(0,3)-b'\\x80'*8] 0.0007665253787308408 0.0005045961253310499 34.17% 51.91% 1.52x
hexbytes_getitem_slice[slice(0,3)-b'\\xde\\xad\\xbe\\xef'] 0.0007571935188303817 0.0005000643037766151 33.96% 51.42% 1.51x
hexbytes_getitem_slice[slice(0,3)-b'\\xff'*64] 0.0007580912225709302 0.0005079238941283905 33.00% 49.25% 1.49x
hexbytes_getitem_slice[slice(0,3)-b'a'*1024] 0.000762206819611075 0.0005123505725158143 32.78% 48.77% 1.49x
hexbytes_getitem_slice[slice(0,3)-b'abc'] 0.0008085940398421699 0.0005031057229625507 37.78% 60.72% 1.61x
hexbytes_getitem_slice[slice(0,3)-long alternating] 0.0007656539882974852 0.0005061574618138693 33.89% 51.27% 1.51x
hexbytes_getitem_slice[slice(0,3)-mixed pattern] 0.0007666534598083335 0.0005052904228716186 34.09% 51.73% 1.52x
hexbytes_getitem_slice[slice(0,3)-multiples of 0x10] 0.0007667880266992266 0.000502650690608015 34.45% 52.55% 1.53x
hexbytes_getitem_slice[slice(0,3)-palindrome ascii] 0.0007670040595625855 0.0005066039418316377 33.95% 51.40% 1.51x
hexbytes_getitem_slice[slice(0,3)-palindrome numeric] 0.0007774453393144235 0.0005083131069434453 34.62% 52.95% 1.53x
hexbytes_getitem_slice[slice(0,3)-palindrome] 0.0007630130285494073 0.0005052585634316703 33.78% 51.01% 1.51x
hexbytes_getitem_slice[slice(0,3)-repeated 0-9] 0.0007686075849771887 0.0005034289414150619 34.50% 52.67% 1.53x
hexbytes_getitem_slice[slice(0,3)-single 0xff] 0.0007349138271066517 0.0004912058278051052 33.16% 49.61% 1.50x
hexbytes_getitem_slice[slice(0,3)-single null byte] 0.0007367613966816704 0.0004918808878947426 33.24% 49.78% 1.50x
hexbytes_getitem_slice[slice(0,3)-two patterns] 0.0007775526860089106 0.0005041366491297661 35.16% 54.23% 1.54x
hexbytes_getitem_slice[slice(1,6)-0-9] 0.0007666561314554037 0.0005057539969198515 34.03% 51.59% 1.52x
hexbytes_getitem_slice[slice(1,6)-4-byte pattern] 0.0007672161342710039 0.0005191228596216879 32.34% 47.79% 1.48x
hexbytes_getitem_slice[slice(1,6)-all byte values] 0.0007699484398425938 0.0005078450253992342 34.04% 51.61% 1.52x
hexbytes_getitem_slice[slice(1,6)-alternating 0x00/0xff] 0.0007690745859425932 0.0005037570688546641 34.50% 52.67% 1.53x
hexbytes_getitem_slice[slice(1,6)-alternating 0xaa/0x55] 0.0007708791502266081 0.0005060095074077734 34.36% 52.34% 1.52x
hexbytes_getitem_slice[slice(1,6)-ascii sentence] 0.0007690223738127535 0.0005068192756069014 34.10% 51.74% 1.52x
hexbytes_getitem_slice[slice(1,6)-b''] 0.0007378444766763428 0.0004903645237884231 33.54% 50.47% 1.50x
hexbytes_getitem_slice[slice(1,6)-b'\\x00'*32] 0.0007801107680013047 0.000510306224144605 34.59% 52.87% 1.53x
hexbytes_getitem_slice[slice(1,6)-b'\\x00\\xff\\x00\\xff'] 0.0007706866817472456 0.0005091016942448291 33.94% 51.38% 1.51x
hexbytes_getitem_slice[slice(1,6)-b'\\x01'*100] 0.0007698163615215447 0.0005067704227375724 34.17% 51.91% 1.52x
hexbytes_getitem_slice[slice(1,6)-b'\\x01'*2048] 0.0007650989194048876 0.0005102683657928777 33.31% 49.94% 1.50x
hexbytes_getitem_slice[slice(1,6)-b'\\x01\\x02\\x03'] 0.0007645180070878311 0.0005164819301576863 32.44% 48.02% 1.48x
hexbytes_getitem_slice[slice(1,6)-b'\\x10\\x20\\x30\\x40\\x50'] 0.0007664863144674464 0.0005212740010613365 31.99% 47.04% 1.47x
hexbytes_getitem_slice[slice(1,6)-b'\\x7f'*8] 0.0008142611913114468 0.0005101124915744808 37.35% 59.62% 1.60x
hexbytes_getitem_slice[slice(1,6)-b'\\x80'*8] 0.000770651576469533 0.0005087252347921686 33.99% 51.49% 1.51x
hexbytes_getitem_slice[slice(1,6)-b'\\xde\\xad\\xbe\\xef'] 0.0007696667204716211 0.0005040447498656266 34.51% 52.70% 1.53x
hexbytes_getitem_slice[slice(1,6)-b'\\xff'*64] 0.0007625726822281015 0.0005105521441811621 33.05% 49.36% 1.49x
hexbytes_getitem_slice[slice(1,6)-b'a'*1024] 0.0007644985569908452 0.0005107300535941423 33.19% 49.69% 1.50x
hexbytes_getitem_slice[slice(1,6)-b'abc'] 0.0007680849269249498 0.0005109037652504424 33.48% 50.34% 1.50x
hexbytes_getitem_slice[slice(1,6)-long alternating] 0.0007658994044221603 0.0005033440110700541 34.28% 52.16% 1.52x
hexbytes_getitem_slice[slice(1,6)-mixed pattern] 0.000768955421726253 0.0005082253015950997 33.91% 51.30% 1.51x
hexbytes_getitem_slice[slice(1,6)-multiples of 0x10] 0.0007700343103720825 0.0005054958038064868 34.35% 52.33% 1.52x
hexbytes_getitem_slice[slice(1,6)-palindrome ascii] 0.0007611623262243023 0.0005117201020089682 32.77% 48.75% 1.49x
hexbytes_getitem_slice[slice(1,6)-palindrome numeric] 0.0007647641070020693 0.0005062554849120618 33.80% 51.06% 1.51x
hexbytes_getitem_slice[slice(1,6)-palindrome] 0.0007705647530685572 0.0005088609590135869 33.96% 51.43% 1.51x
hexbytes_getitem_slice[slice(1,6)-repeated 0-9] 0.0007701055051147719 0.000504367853456094 34.51% 52.69% 1.53x
hexbytes_getitem_slice[slice(1,6)-single 0xff] 0.0007370520879954632 0.0004918188798221837 33.27% 49.86% 1.50x
hexbytes_getitem_slice[slice(1,6)-single null byte] 0.0007372722441800334 0.0004902205771532583 33.51% 50.40% 1.50x
hexbytes_getitem_slice[slice(1,6)-two patterns] 0.0007723066047823834 0.0005062108680044081 34.45% 52.57% 1.53x
hexbytes_getitem_slice[slice(2,None)-0-9] 0.0007541187781202154 0.0005027630861623846 33.33% 49.99% 1.50x
hexbytes_getitem_slice[slice(2,None)-4-byte pattern] 0.0007912992294558164 0.000530119774129724 33.01% 49.27% 1.49x
hexbytes_getitem_slice[slice(2,None)-all byte values] 0.0007858551686835157 0.0005315163237614773 32.36% 47.85% 1.48x
hexbytes_getitem_slice[slice(2,None)-alternating 0x00/0xff] 0.0007463746782798412 0.0005032308126559352 32.58% 48.32% 1.48x
hexbytes_getitem_slice[slice(2,None)-alternating 0xaa/0x55] 0.0007509996883712564 0.0005173128736212475 31.12% 45.17% 1.45x
hexbytes_getitem_slice[slice(2,None)-ascii sentence] 0.0007430478609182664 0.0004957281450800112 33.28% 49.89% 1.50x
hexbytes_getitem_slice[slice(2,None)-b''] 0.0007250706399109304 0.00048438700359530246 33.19% 49.69% 1.50x
hexbytes_getitem_slice[slice(2,None)-b'\\x00'*32] 0.0007498682933531576 0.0005004500080063268 33.26% 49.84% 1.50x
hexbytes_getitem_slice[slice(2,None)-b'\\x00\\xff\\x00\\xff'] 0.0007583027243241571 0.0005039550246226497 33.54% 50.47% 1.50x
hexbytes_getitem_slice[slice(2,None)-b'\\x01'*100] 0.0007453624577293968 0.0005017555864493906 32.68% 48.55% 1.49x
hexbytes_getitem_slice[slice(2,None)-b'\\x01'*2048] 0.0009388016862547137 0.0006287386677545343 33.03% 49.32% 1.49x
hexbytes_getitem_slice[slice(2,None)-b'\\x01\\x02\\x03'] 0.0007233278949258002 0.0004827907676146764 33.25% 49.82% 1.50x
hexbytes_getitem_slice[slice(2,None)-b'\\x10\\x20\\x30\\x40\\x50'] 0.0007593667293475367 0.0005019825311020107 33.89% 51.27% 1.51x
hexbytes_getitem_slice[slice(2,None)-b'\\x7f'*8] 0.0007550094322090281 0.000499203613797121 33.88% 51.24% 1.51x
hexbytes_getitem_slice[slice(2,None)-b'\\x80'*8] 0.0007542784843994306 0.0005064505393298387 32.86% 48.93% 1.49x
hexbytes_getitem_slice[slice(2,None)-b'\\xde\\xad\\xbe\\xef'] 0.0007560000464754682 0.0005251861737245499 30.53% 43.95% 1.44x
hexbytes_getitem_slice[slice(2,None)-b'\\xff'*64] 0.0007504877727976645 0.0005058789213314925 32.59% 48.35% 1.48x
hexbytes_getitem_slice[slice(2,None)-b'a'*1024] 0.0008633088503527906 0.000626699866751125 27.41% 37.75% 1.38x
hexbytes_getitem_slice[slice(2,None)-b'abc'] 0.000720151427092856 0.0004829060256382426 32.94% 49.13% 1.49x
hexbytes_getitem_slice[slice(2,None)-long alternating] 0.0009059783049590332 0.0005957360990744816 34.24% 52.08% 1.52x
hexbytes_getitem_slice[slice(2,None)-mixed pattern] 0.0007476851284617134 0.0005054466940744665 32.40% 47.93% 1.48x
hexbytes_getitem_slice[slice(2,None)-multiples of 0x10] 0.0007399629084665175 0.0005044022574237364 31.83% 46.70% 1.47x
hexbytes_getitem_slice[slice(2,None)-palindrome ascii] 0.0007547253209030246 0.0005018320915293474 33.51% 50.39% 1.50x
hexbytes_getitem_slice[slice(2,None)-palindrome numeric] 0.000756134310262083 0.000503866970328451 33.36% 50.07% 1.50x
hexbytes_getitem_slice[slice(2,None)-palindrome] 0.0007630241489681448 0.0004994626063012299 34.54% 52.77% 1.53x
hexbytes_getitem_slice[slice(2,None)-repeated 0-9] 0.0007478378925295373 0.0005075965739777354 32.12% 47.33% 1.47x
hexbytes_getitem_slice[slice(2,None)-single 0xff] 0.0007239922063836876 0.0004839946958206721 33.15% 49.59% 1.50x
hexbytes_getitem_slice[slice(2,None)-single null byte] 0.0007225343314160217 0.0004820066825960389 33.29% 49.90% 1.50x
hexbytes_getitem_slice[slice(2,None)-two patterns] 0.0007488874278267181 0.0005068099075112375 32.32% 47.76% 1.48x
hexbytes_getitem_slice[slice(None,None)-0-9] 0.0007327978365969977 0.00048395257516118637 33.96% 51.42% 1.51x
hexbytes_getitem_slice[slice(None,None)-4-byte pattern] 0.0008138762049583428 0.0004947676525982924 39.21% 64.50% 1.64x
hexbytes_getitem_slice[slice(None,None)-all byte values] 0.0007515556332028824 0.0004923392114389165 34.49% 52.65% 1.53x
hexbytes_getitem_slice[slice(None,None)-alternating 0x00/0xff] 0.0007349903824808652 0.0005138432993032826 30.09% 43.04% 1.43x
hexbytes_getitem_slice[slice(None,None)-alternating 0xaa/0x55] 0.0007383309545117131 0.0005200939952840454 29.56% 41.96% 1.42x
hexbytes_getitem_slice[slice(None,None)-ascii sentence] 0.0007301063398728716 0.00048283842272486615 33.87% 51.21% 1.51x
hexbytes_getitem_slice[slice(None,None)-b''] 0.00071399836403654 0.00046159769809402243 35.35% 54.68% 1.55x
hexbytes_getitem_slice[slice(None,None)-b'\\x00'*32] 0.0007837984232325521 0.00048335207397915217 38.33% 62.16% 1.62x
hexbytes_getitem_slice[slice(None,None)-b'\\x00\\xff\\x00\\xff'] 0.0007384474554378138 0.0004853684275432508 34.27% 52.14% 1.52x
hexbytes_getitem_slice[slice(None,None)-b'\\x01'*100] 0.0007313023249996363 0.0004936925118181113 32.49% 48.13% 1.48x
hexbytes_getitem_slice[slice(None,None)-b'\\x01'*2048] 0.0008725979700539473 0.0006335159646987776 27.40% 37.74% 1.38x
hexbytes_getitem_slice[slice(None,None)-b'\\x01\\x02\\x03'] 0.0007387454794820631 0.0004900164282907336 33.67% 50.76% 1.51x
hexbytes_getitem_slice[slice(None,None)-b'\\x10\\x20\\x30\\x40\\x50'] 0.0007377376123679695 0.00048765593566483677 33.90% 51.28% 1.51x
hexbytes_getitem_slice[slice(None,None)-b'\\x7f'*8] 0.0007281043670349184 0.0005134501792711461 29.48% 41.81% 1.42x
hexbytes_getitem_slice[slice(None,None)-b'\\x80'*8] 0.0007329481026935012 0.00048763247832629095 33.47% 50.31% 1.50x
hexbytes_getitem_slice[slice(None,None)-b'\\xde\\xad\\xbe\\xef'] 0.0007455653744295298 0.0004868815863509701 34.70% 53.13% 1.53x
hexbytes_getitem_slice[slice(None,None)-b'\\xff'*64] 0.0007287594610847005 0.0005215673324076097 28.43% 39.72% 1.40x
hexbytes_getitem_slice[slice(None,None)-b'a'*1024] 0.0008418661631762908 0.0005777017507091948 31.38% 45.73% 1.46x
hexbytes_getitem_slice[slice(None,None)-b'abc'] 0.0007360147509568947 0.000490057899172727 33.42% 50.19% 1.50x
hexbytes_getitem_slice[slice(None,None)-long alternating] 0.000846363082123537 0.0006139801523809256 27.46% 37.85% 1.38x
hexbytes_getitem_slice[slice(None,None)-mixed pattern] 0.0007333361209611165 0.0004869431847225879 33.60% 50.60% 1.51x
hexbytes_getitem_slice[slice(None,None)-multiples of 0x10] 0.0007355309320765405 0.00048099038679633974 34.61% 52.92% 1.53x
hexbytes_getitem_slice[slice(None,None)-palindrome ascii] 0.0007323107877643212 0.0004868363079671412 33.52% 50.42% 1.50x
hexbytes_getitem_slice[slice(None,None)-palindrome numeric] 0.0007354292108035588 0.000485605967647442 33.97% 51.45% 1.51x
hexbytes_getitem_slice[slice(None,None)-palindrome] 0.0007334489396148581 0.00048247903220869796 34.22% 52.02% 1.52x
hexbytes_getitem_slice[slice(None,None)-repeated 0-9] 0.0007341762060321683 0.0004937204965717326 32.75% 48.70% 1.49x
hexbytes_getitem_slice[slice(None,None)-single 0xff] 0.0007126143722645633 0.00046474296430301984 34.78% 53.34% 1.53x
hexbytes_getitem_slice[slice(None,None)-single null byte] 0.0007089015308178174 0.00046541409187453325 34.35% 52.32% 1.52x
hexbytes_getitem_slice[slice(None,None)-two patterns] 0.0007338101743748118 0.0005350825923876228 27.08% 37.14% 1.37x
hexbytes_new[''] 0.0006757268623394059 0.0002864376626027422 57.61% 135.91% 2.36x
hexbytes_new['0x'] 0.0007356388981188673 0.00028063624855487846 61.85% 162.13% 2.62x
hexbytes_new['0x'+'00'*64] 0.0008946495711523556 0.0004376374203561509 51.08% 104.43% 2.04x
hexbytes_new['0x'+'a'*128] 0.0008776543380016198 0.00042890473057653023 51.13% 104.63% 2.05x
hexbytes_new['0x'+'ff'*32] 0.0008419182740207142 0.0004004594622518755 52.43% 110.24% 2.10x
hexbytes_new['0x1234'] 0.0008233267632249901 0.00036698768202359427 55.43% 124.35% 2.24x
hexbytes_new['0xabcdef'] 0.0008303245686786095 0.00037563874738529896 54.76% 121.04% 2.21x
hexbytes_new['0xCAFEBABE'] 0.0008293931319446458 0.0003715214849822568 55.21% 123.24% 2.23x
hexbytes_new['0xdeadbeef'] 0.0008295289551225057 0.0003725005913611729 55.09% 122.69% 2.23x
hexbytes_new['abc'] 0.0007902732121974855 0.0003996609748916747 49.43% 97.74% 1.98x
hexbytes_new['deadbeef'] 0.0007222896193509182 0.00035243764853171784 51.21% 104.94% 2.05x
hexbytes_new[0-9] 0.00039427913989671973 0.00025245725638331826 35.97% 56.18% 1.56x
hexbytes_new[0] 0.0012169286202520974 0.00030016523665545486 75.33% 305.42% 4.05x
hexbytes_new[1] 0.0012166749135809666 0.0003065926194553385 74.80% 296.84% 3.97x
hexbytes_new[123456] 0.0012757070107074617 0.0003070781245664983 75.93% 315.43% 4.15x
hexbytes_new[2**16] 0.0012578837008865363 0.0003104935583488901 75.32% 305.12% 4.05x
hexbytes_new[2**256-1] 0.0013189467655632186 0.00034371215807159084 73.94% 283.74% 3.84x
hexbytes_new[2**32] 0.0013018812039991493 0.00032914669986853454 74.72% 295.53% 3.96x
hexbytes_new[2**64] 0.001302048005348502 0.0003333898766433999 74.39% 290.55% 3.91x
hexbytes_new[2**8] 0.0012550787858970126 0.00030584598818215563 75.63% 310.36% 4.10x
hexbytes_new[255] 0.0011954873905667333 0.0003039199353360293 74.58% 293.36% 3.93x
hexbytes_new[4-byte pattern] 0.0004077265179385041 0.0002655092995311831 34.88% 53.56% 1.54x
hexbytes_new[all byte values] 0.0004105019155093366 0.000261423272055102 36.32% 57.03% 1.57x
hexbytes_new[alternating 0x00/0xff] 0.00039413577708907125 0.0002578053879356885 34.59% 52.88% 1.53x
hexbytes_new[alternating 0xaa/0x55] 0.0003954508447525606 0.00025766728511843233 34.84% 53.47% 1.53x
hexbytes_new[ascii sentence] 0.00037857946337647606 0.00025333503942911675 33.08% 49.44% 1.49x
hexbytes_new[b''] 0.0003899572442889041 0.0002532656372966542 35.05% 53.97% 1.54x
hexbytes_new[b'\\x00'*32] 0.0003924281415103086 0.0002523721397854785 35.69% 55.50% 1.55x
hexbytes_new[b'\\x00\\xff\\x00\\xff'] 0.00039495446068807735 0.0002528964666497517 35.97% 56.17% 1.56x
hexbytes_new[b'\\x01'*100] 0.000391957381402419 0.0002559295439003873 34.70% 53.15% 1.53x
hexbytes_new[b'\\x01'*2048] 0.0004867585736740973 0.0003954753250743763 18.75% 23.08% 1.23x
hexbytes_new[b'\\x01\\x02\\x03'] 0.00041828977403168875 0.0002609970485473097 37.60% 60.27% 1.60x
hexbytes_new[b'\\x10\\x20\\x30\\x40\\x50'] 0.00039794182935158374 0.0002537143672303283 36.24% 56.85% 1.57x
hexbytes_new[b'\\x7f'*8] 0.0003932649674600911 0.0002562126081683494 34.85% 53.49% 1.53x
hexbytes_new[b'\\x80'*8] 0.0003950294775680181 0.000254878586168808 35.48% 54.99% 1.55x
hexbytes_new[b'\\xde\\xad\\xbe\\xef'] 0.00038970042756281814 0.00025289808630679384 35.10% 54.09% 1.54x
hexbytes_new[b'\\xff'*64] 0.0003914056944218838 0.0002592227734909088 33.77% 50.99% 1.51x
hexbytes_new[b'a'*1024] 0.00043451784588528075 0.000286695150231192 34.02% 51.56% 1.52x
hexbytes_new[b'abc'] 0.00039257206761529796 0.0002531453326740037 35.52% 55.08% 1.55x
hexbytes_new[bytearray(0-9)] 0.0006124712182870674 0.0003540280363231784 42.20% 73.00% 1.73x
hexbytes_new[bytearray(4-byte pattern)] 0.0006477888165436574 0.0003481264171590058 46.26% 86.08% 1.86x
hexbytes_new[bytearray(all byte values)] 0.000642999333775989 0.0003477452524366286 45.92% 84.91% 1.85x
hexbytes_new[bytearray(alternating 0x00/0xff)] 0.0006188601923075983 0.00034561497490038194 44.15% 79.06% 1.79x
hexbytes_new[bytearray(alternating 0xaa/0x55)] 0.0006200846054815008 0.0003486709496978191 43.77% 77.84% 1.78x
hexbytes_new[bytearray(ascii sentence)] 0.0006052648879151714 0.00034540888329836187 42.93% 75.23% 1.75x
hexbytes_new[bytearray(b'')] 0.0006002437189352231 0.00033707778589123607 43.84% 78.07% 1.78x
hexbytes_new[bytearray(b'\\x00'*32)] 0.000616555321700709 0.0003520501777533288 42.90% 75.13% 1.75x
hexbytes_new[bytearray(b'\\x00\\xff\\x00\\xff')] 0.0006139784021679136 0.000344170050200092 43.94% 78.39% 1.78x
hexbytes_new[bytearray(b'\\x01'*100)] 0.0006186835300124554 0.00035874146498229045 42.02% 72.46% 1.72x
hexbytes_new[bytearray(b'\\x01'*2048)] 0.000817567222130206 0.00047695461392420805 41.66% 71.41% 1.71x
hexbytes_new[bytearray(b'\\x01\\x02\\x03')] 0.0006154507360308289 0.00035139010124358603 42.91% 75.15% 1.75x
hexbytes_new[bytearray(b'\\x10\\x20\\x30\\x40\\x50')] 0.0006191420559849898 0.00034814546961074033 43.77% 77.84% 1.78x
hexbytes_new[bytearray(b'\\x7f'*8)] 0.0006135069701761334 0.00034374036380349177 43.97% 78.48% 1.78x
hexbytes_new[bytearray(b'\\x80'*8)] 0.0006172677544749998 0.0003439546319112817 44.28% 79.46% 1.79x
hexbytes_new[bytearray(b'\\xde\\xad\\xbe\\xef')] 0.0006123897878992944 0.000344775986867035 43.70% 77.62% 1.78x
hexbytes_new[bytearray(b'\\xff'*64)] 0.00061181419599081 0.00037429812244123533 38.82% 63.46% 1.63x
hexbytes_new[bytearray(b'a'*1024)] 0.0007583407535095519 0.00044578671225107105 41.22% 70.11% 1.70x
hexbytes_new[bytearray(b'abc')] 0.0006127626160871806 0.0003551521444978806 42.04% 72.54% 1.73x
hexbytes_new[bytearray(long alternating)] 0.0007665586101033531 0.00045455322938130275 40.70% 68.64% 1.69x
hexbytes_new[bytearray(mixed pattern)] 0.000610747635794808 0.00034362983211189596 43.74% 77.73% 1.78x
hexbytes_new[bytearray(multiples of 0x10)] 0.0006274673475686194 0.00035233222639498784 43.85% 78.09% 1.78x
hexbytes_new[bytearray(palindrome ascii)] 0.0006203933854736917 0.00034926231232588535 43.70% 77.63% 1.78x
hexbytes_new[bytearray(palindrome numeric)] 0.0006281356449930259 0.00034516999790426046 45.05% 81.98% 1.82x
hexbytes_new[bytearray(palindrome)] 0.0006193607864198372 0.0003409341009270737 44.95% 81.67% 1.82x
hexbytes_new[bytearray(repeated 0-9)] 0.0006105675030450814 0.0003566012531329629 41.60% 71.22% 1.71x
hexbytes_new[bytearray(single 0xff)] 0.0006243015723598404 0.0003525810070049527 43.52% 77.07% 1.77x
hexbytes_new[bytearray(single null byte)] 0.0006334905953279831 0.00035370224144276114 44.17% 79.10% 1.79x
hexbytes_new[bytearray(two patterns)] 0.0006118393060310949 0.0003470846172180828 43.27% 76.28% 1.76x
hexbytes_new[False] 0.0005611155551768242 0.0002525845380607691 54.99% 122.15% 2.22x
hexbytes_new[long alternating] 0.000438537111470511 0.00030257233397878194 31.00% 44.94% 1.45x
hexbytes_new[memoryview(0-9)] 0.0007567725796076832 0.0003924772385746912 48.14% 92.82% 1.93x
hexbytes_new[memoryview(4-byte pattern)] 0.0008077953663027752 0.00038547429368560564 52.28% 109.56% 2.10x
hexbytes_new[memoryview(all byte values)] 0.0008315145693367354 0.00038509501095845903 53.69% 115.92% 2.16x
hexbytes_new[memoryview(alternating 0x00/0xff)] 0.0007582859937493858 0.0004077587759999293 46.23% 85.96% 1.86x
hexbytes_new[memoryview(alternating 0xaa/0x55)] 0.0007568627832812452 0.0004077705044787185 46.12% 85.61% 1.86x
hexbytes_new[memoryview(ascii sentence)] 0.0007645686368665454 0.00037980704468413786 50.32% 101.30% 2.01x
hexbytes_new[memoryview(b'')] 0.0007455003275086465 0.00036710227844584994 50.76% 103.08% 2.03x
hexbytes_new[memoryview(b'\\x00'*32)] 0.0007587607396732215 0.000392199187669549 48.31% 93.46% 1.93x
hexbytes_new[memoryview(b'\\x00\\xff\\x00\\xff')] 0.000770436079969657 0.00037974118754953185 50.71% 102.88% 2.03x
hexbytes_new[memoryview(b'\\x01'*100)] 0.0007661529368499241 0.0003944896909703347 48.51% 94.21% 1.94x
hexbytes_new[memoryview(b'\\x01'*2048)] 0.0009547358321886169 0.0005168406898175577 45.87% 84.73% 1.85x
hexbytes_new[memoryview(b'\\x01\\x02\\x03')] 0.0007743104620150349 0.0003785397520208228 51.11% 104.55% 2.05x
hexbytes_new[memoryview(b'\\x10\\x20\\x30\\x40\\x50')] 0.0007573627950497105 0.00038034026597357303 49.78% 99.13% 1.99x
hexbytes_new[memoryview(b'\\x7f'*8)] 0.0007749602339917103 0.00039756107967663427 48.70% 94.93% 1.95x
hexbytes_new[memoryview(b'\\x80'*8)] 0.0007746764858419722 0.0003795627558234577 51.00% 104.10% 2.04x
hexbytes_new[memoryview(b'\\xde\\xad\\xbe\\xef')] 0.0007698903299287942 0.0003789449632532138 50.78% 103.17% 2.03x
hexbytes_new[memoryview(b'\\xff'*64)] 0.0007680442144552532 0.00038484190058662917 49.89% 99.57% 2.00x
hexbytes_new[memoryview(b'a'*1024)] 0.0009132535832550592 0.0004884688834297247 46.51% 86.96% 1.87x
hexbytes_new[memoryview(b'abc')] 0.0007692440312996923 0.00038151819060564717 50.40% 101.63% 2.02x
hexbytes_new[memoryview(long alternating)] 0.0009043270689989371 0.0005176032074971454 42.76% 74.71% 1.75x
hexbytes_new[memoryview(mixed pattern)] 0.0007724383599057907 0.00038208789643990096 50.53% 102.16% 2.02x
hexbytes_new[memoryview(multiples of 0x10)] 0.0007517019802046745 0.00037903708310018617 49.58% 98.32% 1.98x
hexbytes_new[memoryview(palindrome ascii)] 0.0007624536620900125 0.0003810918032561783 50.02% 100.07% 2.00x
hexbytes_new[memoryview(palindrome numeric)] 0.0007697682250572004 0.00038160940641682585 50.43% 101.72% 2.02x
hexbytes_new[memoryview(palindrome)] 0.0007734001754671287 0.0003816855415824967 50.65% 102.63% 2.03x
hexbytes_new[memoryview(repeated 0-9)] 0.0007742774579296356 0.00039568282779353864 48.90% 95.68% 1.96x
hexbytes_new[memoryview(single 0xff)] 0.0007760311711783374 0.0003825895705402092 50.70% 102.84% 2.03x
hexbytes_new[memoryview(single null byte)] 0.0007766776757844862 0.000383927456739053 50.57% 102.30% 2.02x
hexbytes_new[memoryview(two patterns)] 0.0007698373555549714 0.00038446451426360175 50.06% 100.24% 2.00x
hexbytes_new[mixed pattern] 0.00038554818940996145 0.0002585175122270597 32.95% 49.14% 1.49x
hexbytes_new[multiples of 0x10] 0.00039372591755894765 0.0002515022908489314 36.12% 56.55% 1.57x
hexbytes_new[palindrome ascii] 0.00039063303038727385 0.0002537979211950569 35.03% 53.91% 1.54x
hexbytes_new[palindrome numeric] 0.0003874545945491492 0.0002540461906209328 34.43% 52.51% 1.53x
hexbytes_new[palindrome] 0.00039169927534612005 0.0002539203701985864 35.17% 54.26% 1.54x
hexbytes_new[repeated 0-9] 0.0003795282706829242 0.00025580453603372993 32.60% 48.37% 1.48x
hexbytes_new[single 0xff] 0.0003859970045429942 0.00024895598905295556 35.50% 55.05% 1.55x
hexbytes_new[single null byte] 0.00038487339021401414 0.00025433954913401535 33.92% 51.32% 1.51x
hexbytes_new[True] 0.0005806372098836791 0.0002524368663572057 56.52% 130.01% 2.30x
hexbytes_new[two patterns] 0.0003867354362082136 0.00025811951886790395 33.26% 49.83% 1.50x
hexbytes_repr[0-9] 0.00029959352317876975 0.00014942699180256716 50.12% 100.49% 2.00x
hexbytes_repr[4-byte pattern] 0.0012792396849693201 0.0004587719425050826 64.14% 178.84% 2.79x
hexbytes_repr[all byte values] 0.00131135990653054 0.00039855865848797294 69.61% 229.03% 3.29x
hexbytes_repr[alternating 0x00/0xff] 0.0005118083946341282 0.00020029622738241824 60.86% 155.53% 2.56x
hexbytes_repr[alternating 0xaa/0x55] 0.0005078799864326981 0.00020051824398301257 60.52% 153.28% 2.53x
hexbytes_repr[ascii sentence] 0.0004263916103603112 0.00018787240829353476 55.94% 126.96% 2.27x
hexbytes_repr[b''] 0.0002115422549363835 0.00012362494603093227 41.56% 71.12% 1.71x
hexbytes_repr[b'\\x00'*32] 0.00038189426107722226 0.00017282544153595674 54.75% 120.97% 2.21x
hexbytes_repr[b'\\x00\\xff\\x00\\xff'] 0.00027471610308603145 0.00014692647767539226 46.52% 86.98% 1.87x
hexbytes_repr[b'\\x01'*100] 0.0006494205202591896 0.00023554920572903997 63.73% 175.70% 2.76x
hexbytes_repr[b'\\x01'*2048] 0.008286006438031243 0.0022387614660581106 72.98% 270.12% 3.70x
hexbytes_repr[b'\\x01\\x02\\x03'] 0.00027147270089629877 0.00015606798492217243 42.51% 73.95% 1.74x
hexbytes_repr[b'\\x10\\x20\\x30\\x40\\x50'] 0.0002885530401732882 0.00014468700468453445 49.86% 99.43% 1.99x
hexbytes_repr[b'\\x7f'*8] 0.0003004871983814337 0.00014895343342753275 50.43% 101.73% 2.02x
hexbytes_repr[b'\\x80'*8] 0.0003029744063809596 0.00014830753870716937 51.05% 104.29% 2.04x
hexbytes_repr[b'\\xde\\xad\\xbe\\xef'] 0.0002745177017957475 0.00014560984637681788 46.96% 88.53% 1.89x
hexbytes_repr[b'\\xff'*64] 0.0005072829690531657 0.00020216666305993637 60.15% 150.92% 2.51x
hexbytes_repr[b'a'*1024] 0.004312928135373927 0.0011808534628166042 72.62% 265.24% 3.65x
hexbytes_repr[b'abc'] 0.0002727876953682159 0.00014656403788171444 46.27% 86.12% 1.86x
hexbytes_repr[long alternating] 0.0043202824870679155 0.0012312239652141023 71.50% 250.89% 3.51x
hexbytes_repr[mixed pattern] 0.0010522169269917012 0.0003347721254189027 68.18% 214.31% 3.14x
hexbytes_repr[multiples of 0x10] 0.0003008010938296631 0.0001514536251905896 49.65% 98.61% 1.99x
hexbytes_repr[palindrome ascii] 0.0002873395124134867 0.0001467843109990857 48.92% 95.76% 1.96x
hexbytes_repr[palindrome numeric] 0.00027914156083997196 0.00014556348380869604 47.85% 91.77% 1.92x
hexbytes_repr[palindrome] 0.0003375358900492239 0.00016098900322602806 52.30% 109.66% 2.10x
hexbytes_repr[repeated 0-9] 0.0006501625482989165 0.000235285968840488 63.81% 176.33% 2.76x
hexbytes_repr[single 0xff] 0.0002735791100531874 0.00014397520425989387 47.37% 90.02% 1.90x
hexbytes_repr[single null byte] 0.0002838991438898751 0.00014343852364450356 49.48% 97.92% 1.98x
hexbytes_repr[two patterns] 0.0005087105650582929 0.0002014985807802961 60.39% 152.46% 2.52x
hexbytes_to_0x_hex[0-9] 0.0001696691535712596 0.00014470246121641063 14.71% 17.25% 1.17x
hexbytes_to_0x_hex[4-byte pattern] 0.0004241125893996703 0.00039398154506570054 7.10% 7.65% 1.08x
hexbytes_to_0x_hex[all byte values] 0.0004242815013237549 0.00039414083807559803 7.10% 7.65% 1.08x
hexbytes_to_0x_hex[alternating 0x00/0xff] 0.00022540181175336973 0.00019994785683894833 11.29% 12.73% 1.13x
hexbytes_to_0x_hex[alternating 0xaa/0x55] 0.00022352949814556604 0.00020684251765393068 7.47% 8.07% 1.08x
hexbytes_to_0x_hex[ascii sentence] 0.00020994831580044664 0.00017358498714729165 17.32% 20.95% 1.21x
hexbytes_to_0x_hex[b''] 0.00010782766622310241 0.00011613675875707743 -7.71% -7.15% 0.93x
hexbytes_to_0x_hex[b'\\x00'*32] 0.0001873465884131832 0.00016450653953599363 12.19% 13.88% 1.14x
hexbytes_to_0x_hex[b'\\x00\\xff\\x00\\xff'] 0.00016566248681252745 0.00014198072167124993 14.30% 16.68% 1.17x
hexbytes_to_0x_hex[b'\\x01'*100] 0.0002604077999481321 0.0002301707456738541 11.61% 13.14% 1.13x
hexbytes_to_0x_hex[b'\\x01'*2048] 0.0022209063459836136 0.0021952476725281096 1.16% 1.17% 1.01x
hexbytes_to_0x_hex[b'\\x01\\x02\\x03'] 0.00016262265139749946 0.00014054220250173222 13.58% 15.71% 1.16x
hexbytes_to_0x_hex[b'\\x10\\x20\\x30\\x40\\x50'] 0.00016592915441181384 0.00014140525989240948 14.78% 17.34% 1.17x
hexbytes_to_0x_hex[b'\\x7f'*8] 0.00016798833980059382 0.00014389215448107597 14.34% 16.75% 1.17x
hexbytes_to_0x_hex[b'\\x80'*8] 0.00016819273017962998 0.0001474111228017236 12.36% 14.10% 1.14x
hexbytes_to_0x_hex[b'\\xde\\xad\\xbe\\xef'] 0.0001633914862691051 0.00014947149830766217 8.52% 9.31% 1.09x
hexbytes_to_0x_hex[b'\\xff'*64] 0.00022490817937400332 0.0002054671067661237 8.64% 9.46% 1.09x
hexbytes_to_0x_hex[b'a'*1024] 0.001239408638462126 0.0012295493644223507 0.80% 0.80% 1.01x
hexbytes_to_0x_hex[b'abc'] 0.00016220902775084903 0.00014054371900904517 13.36% 15.42% 1.15x
hexbytes_to_0x_hex[long alternating] 0.0012165693345622126 0.0011895184372755024 2.22% 2.27% 1.02x
hexbytes_to_0x_hex[mixed pattern] 0.00035950989290920246 0.000331624781692773 7.76% 8.41% 1.08x
hexbytes_to_0x_hex[multiples of 0x10] 0.00016945285543767542 0.00014447925412473643 14.74% 17.29% 1.17x
hexbytes_to_0x_hex[palindrome ascii] 0.00016719680874020083 0.00014195066944818561 15.10% 17.79% 1.18x
hexbytes_to_0x_hex[palindrome numeric] 0.00016601891379309795 0.00014958715595937756 9.90% 10.98% 1.11x
hexbytes_to_0x_hex[palindrome] 0.00017913633949957368 0.0001542625880544688 13.89% 16.12% 1.16x
hexbytes_to_0x_hex[repeated 0-9] 0.000259529736665216 0.00022971358780467292 11.49% 12.98% 1.13x
hexbytes_to_0x_hex[single 0xff] 0.00016429192631240488 0.0001452142547070488 11.61% 13.14% 1.13x
hexbytes_to_0x_hex[single null byte] 0.00017049370439271958 0.00013780615178223693 19.17% 23.72% 1.24x
hexbytes_to_0x_hex[two patterns] 0.00022824379746080233 0.00020072992106455784 12.05% 13.71% 1.14x

@BobTheBuidler
Copy link
Copy Markdown
Owner Author

Local compiled microbenchmarks agree with CodSpeed: this does not produce a reliable win.

At the generated-C level, the small-int path replaces the existing CPyTagged_BitLength(...) / CPyTagged_ToBigEndianBytes(...) route with a BytesWriter allocation plus append/getvalue calls. For 0..255, those costs roughly cancel out; for HexBytes(...), the constructor overhead dilutes any tiny difference further.

Observed local timings were effectively flat, e.g. to_bytes(1) ~37.3 ns base vs ~37.7 ns here, and HexBytes(1) ~117.4 ns base vs ~117.6 ns here. Closing as an invalidated microoptimization.

@BobTheBuidler BobTheBuidler deleted the perf/librt-byteswriter-small-int branch June 1, 2026 06:32
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