Skip to content

Comments

fix: pack_to_unchecked on big-endian targets#35

Merged
DaniPopes merged 1 commit intoalloy-rs:mainfrom
clabby:cl/pack-fix
Aug 15, 2025
Merged

fix: pack_to_unchecked on big-endian targets#35
DaniPopes merged 1 commit intoalloy-rs:mainfrom
clabby:cl/pack-fix

Conversation

@clabby
Copy link
Contributor

@clabby clabby commented Aug 14, 2025

Overview

Fixes an issue for big-endian targets that was introduced by #32, where the temporary value created by as_le_slice was dropped immediately after the expression is evaluated. This change extends the lifetime of the Owned variant.

Repro (run miri): https://play.rust-lang.org/?version=stable&mode=release&edition=2024&gist=b92df156a14b6af538531bd8e3d28923

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 14, 2025

CodSpeed Performance Report

Merging #35 will degrade performances by 20.92%

Comparing clabby:cl/pack-fix (0b24fb4) with main (7f36b9c)

Summary

⚡ 44 improvements
❌ 7 regressions
✅ 60 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
ends_with[16] 342.2 ns 432.8 ns -20.92%
ends_with[8] 339.7 ns 398.1 ns -14.65%
extend[16] 383.9 ns 471.4 ns -18.56%
extend[32] 350.6 ns 438.1 ns -19.97%
extend[8] 386.7 ns 474.2 ns -18.45%
first[16] 120.3 ns 91.1 ns +32.01%
first[32] 120.3 ns 91.1 ns +32.01%
first[64] 120.3 ns 91.1 ns +32.01%
first[8] 120.3 ns 91.1 ns +32.01%
get_byte_unchecked[16] 250 ns 279.2 ns -10.45%
get_byte_unchecked[8] 194.4 ns 223.6 ns -13.04%
increment[16] 365.8 ns 307.5 ns +18.97%
increment[32] 365.8 ns 307.5 ns +18.97%
increment[64] 365.8 ns 307.5 ns +18.97%
increment[8] 365.8 ns 307.5 ns +18.97%
join[64] 276.7 ns 218.3 ns +26.72%
last[16] 152.2 ns 123.1 ns +23.7%
last[32] 152.2 ns 123.1 ns +23.7%
last[8] 152.2 ns 123.1 ns +23.7%
pack[16] 468.3 ns 410 ns +14.23%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@clabby clabby marked this pull request as draft August 14, 2025 18:52
@clabby clabby marked this pull request as ready for review August 14, 2025 19:05
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@DaniPopes DaniPopes merged commit 6f65791 into alloy-rs:main Aug 15, 2025
22 of 23 checks passed
github-merge-queue bot pushed a commit to op-rs/kona that referenced this pull request Aug 15, 2025
## Overview

Adds a CI job to run `kona-client` on `cannon64`.

Also upgrades the dep of `nybbles`; There was a bug that I introduced
recently for big-endian targets, fix included in
alloy-rs/nybbles#35.

---------

Co-authored-by: refcell <abigger87@gmail.com>
matrix-rider609op added a commit to matrix-rider609op/kona that referenced this pull request Sep 29, 2025
## Overview

Adds a CI job to run `kona-client` on `cannon64`.

Also upgrades the dep of `nybbles`; There was a bug that I introduced
recently for big-endian targets, fix included in
alloy-rs/nybbles#35.

---------

Co-authored-by: refcell <abigger87@gmail.com>
aPTRDgvm5ui3dkEtFYWc added a commit to aPTRDgvm5ui3dkEtFYWc/kona that referenced this pull request Oct 2, 2025
## Overview

Adds a CI job to run `kona-client` on `cannon64`.

Also upgrades the dep of `nybbles`; There was a bug that I introduced
recently for big-endian targets, fix included in
alloy-rs/nybbles#35.

---------

Co-authored-by: refcell <abigger87@gmail.com>
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
## Overview

Adds a CI job to run `kona-client` on `cannon64`.

Also upgrades the dep of `nybbles`; There was a bug that I introduced
recently for big-endian targets, fix included in
alloy-rs/nybbles#35.

---------

Co-authored-by: refcell <abigger87@gmail.com>
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
## Overview

Adds a CI job to run `kona-client` on `cannon64`.

Also upgrades the dep of `nybbles`; There was a bug that I introduced
recently for big-endian targets, fix included in
alloy-rs/nybbles#35.

---------

Co-authored-by: refcell <abigger87@gmail.com>
edge-scripter8980 added a commit to edge-scripter8980/kona that referenced this pull request Feb 5, 2026
## Overview

Adds a CI job to run `kona-client` on `cannon64`.

Also upgrades the dep of `nybbles`; There was a bug that I introduced
recently for big-endian targets, fix included in
alloy-rs/nybbles#35.

---------

Co-authored-by: refcell <abigger87@gmail.com>
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