Skip to content

Conversation

@lmmx
Copy link
Owner

@lmmx lmmx commented Mar 2, 2025

This should shrink the wheel sizes

@lmmx
Copy link
Owner Author

lmmx commented Mar 3, 2025

Wheels got 25% smaller, see #2

>>> merged.with_columns(
...     (
...         pl.col("before","after").str.extract(r"(\d+(?:\.\d+)?)").cast(pl.Float64)
...         *
...         pl.col("before","after").str.extract(r"(B|KB|MB|GB)$").replace(units).cast(pl.Int64)...     )
... ).with_columns(delta=(pl.col("after")/pl.col("before"))-1)
shape: (15, 4)
┌──────────────────────────┬────────────┬────────────┬───────────┐
│ arch                     ┆ before     ┆ after      ┆ delta     │
│ ---                      ┆ ---        ┆ ---        ┆ ---       │
│ str                      ┆ f64        ┆ f64        ┆ f64       │
╞══════════════════════════╪════════════╪════════════╪═══════════╡
│ wheels-linux-aarch64     ┆ 6.5746e6   ┆ 4404019.2  ┆ -0.330144 │
│ wheels-linux-armv7       ┆ 5.0541e6   ┆ 3.9636e6   ┆ -0.215768 │
│ wheels-linux-ppc64le     ┆ 6920601.6  ┆ 4.8549e6   ┆ -0.298485 │
│ wheels-linux-s390x       ┆ 6.291456e6 ┆ 5.767168e6 ┆ -0.083333 │
│ wheels-linux-x86         ┆ 4.5298e6   ┆ 3198156.8  ┆ -0.293981 │
│ wheels-linux-x86_64      ┆ 4.7815e6   ┆ 3460300.8  ┆ -0.276316 │
│ wheels-macos-aarch64     ┆ 1.8770e6   ┆ 1.3946e6   ┆ -0.256983 │
│ wheels-macos-x86_64      ┆ 1.8665e6   ┆ 1.4470e6   ┆ -0.224719 │
│ wheels-musllinux-aarch64 ┆ 7.9797e6   ┆ 5.8301e6   ┆ -0.269382 │
│ wheels-musllinux-armv7   ┆ 7.1198e6   ┆ 6.0503e6   ┆ -0.150221 │
│ wheels-musllinux-x86     ┆ 7.4134e6   ┆ 5.6518e6   ┆ -0.237624 │
│ wheels-musllinux-x86_64  ┆ 7.7385e6   ┆ 5976883.2  ┆ -0.227642 │
│ wheels-sdist             ┆ 44339.2    ┆ 44441.6    ┆ 0.002309  │
│ wheels-windows-x64       ┆ 3.1562e6   ┆ 2.0552e6   ┆ -0.348837 │
│ wheels-windows-x86       ┆ 3.0304e6   ┆ 2044723.2  ┆ -0.32526  │
└──────────────────────────┴────────────┴────────────┴───────────┘
>>> normalised = merged.with_columns(
...     (
...         pl.col("before","after").str.extract(r"(\d+(?:\.\d+)?)").cast(pl.Float64)
...         *
...         pl.col("before","after").str.extract(r"(B|KB|MB|GB)$").replace(units).cast(pl.Int64)
...     )
... ).with_columns(delta=(pl.col("after")/pl.col("before"))-1)
>>> normalised.get_column("delta").mean()
-0.23575903794617664
>>> normalised.get_column("delta").min()
-0.34883720930232553
>>> normalised.get_column("delta").max()
0.002309468822170979

So on average the wheels got 25% smaller

@lmmx lmmx merged commit 6cd62f7 into master Mar 3, 2025
17 checks passed
@lmmx lmmx deleted the cargo-release-profile branch March 3, 2025 16:53
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