Skip to content
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

Happier cache lines #491

Merged
merged 3 commits into from
Sep 5, 2024
Merged

Happier cache lines #491

merged 3 commits into from
Sep 5, 2024

Conversation

katef
Copy link
Owner

@katef katef commented Aug 25, 2024

Here I rearranged some structs for slightly denser layout, and (in the case of struct ir_state) to now fit in a single cache line instead of two.

compared to the parent branch this makes basically no difference for testing real-world data. but it does make both me and my cache lines a little bit happier

Probably the only change that actually affects something, `struct ir_state` is both important and now fits within a single cache line.

I did this by eyeballing:
```
; bmake -r -j 10 CC=clang DEBUG=1 && (for t in `cat /tmp/tags`; do pahole --class_name $t build/src/*/*.o build/src/adt/*.o ; done ) > /tmp/tt
```

This gives a ~2% improvement on total execution for rx -q /usr/share/bin/words
Base automatically changed from kate/rx to main September 5, 2024 14:55
@katef katef merged commit 81b14f8 into main Sep 5, 2024
346 checks passed
@katef katef deleted the kate/happy-cache-lines branch September 5, 2024 15: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