Skip to content

Speed up compilation by replacing darling with attrs #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

aatifsyed
Copy link

About a 25% saving:

$ hyperfine \
>    --warmup 1 \
>    --runs 10 \
>    --prepare 'git checkout attrs && cargo clean && rm Cargo.lock' \
>    --command-name attrs \
>    'cargo build --offline' \
>    --prepare 'git checkout master && cargo clean && rm Cargo.lock' \
>    --command-name master \
>    'cargo build --offline'
Benchmark 1: attrs
  Time (mean ± σ):      5.668 s ±  0.834 s    [User: 10.875 s, System: 2.352 s]
  Range (min … max):    4.863 s …  7.809 s    10 runs
 
Benchmark 2: master
  Time (mean ± σ):      7.090 s ±  0.174 s    [User: 12.745 s, System: 2.176 s]
  Range (min … max):    6.769 s …  7.323 s    10 runs
 
Summary
  attrs ran
    1.25 ± 0.19 times faster than master

Because we don't bottleneck compilation:
wsl localhost_Ubuntu_home_aatif_code_cached_master html (1)

wsl localhost_Ubuntu_home_aatif_code_cached_attrs html (1)

Note that I am the author of attrs

@jaemk
Copy link
Owner

jaemk commented May 1, 2025

hey @aatifsyed , you'll need to update the .github/workflows/build.yml like this https://github.com/jaemk/cached/pull/240/files#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721L26-L38 to get the pipeline working again (unless that PR is merged before you see this)

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