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

u3: inline cell deconstruction #536

Merged
merged 3 commits into from
Oct 13, 2023
Merged

u3: inline cell deconstruction #536

merged 3 commits into from
Oct 13, 2023

Conversation

joemfb
Copy link
Member

@joemfb joemfb commented Oct 9, 2023

This PR converts u3r_cell()/trel/&c inline functions and u3x_cell()/trel/&c to macros. This is mostly just a straightforward optimization of frequently used deconstructors, as prelude to optimizing all the jet-interface (u3w*) functions.

In the case of u3x_atom() the previously-defined macro repeated its argument, which is a bad pattern as that "argument" is often a call to another function. It has now been switched to an inline function.

@joemfb joemfb requested a review from a team as a code owner October 9, 2023 14:36
Copy link
Contributor

@matthew-levan matthew-levan left a comment

Choose a reason for hiding this comment

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

LGTM.

@joemfb joemfb merged commit 770d094 into develop Oct 13, 2023
5 checks passed
@joemfb joemfb deleted the jb/fast-uncons branch October 13, 2023 18:15
pkova added a commit that referenced this pull request Nov 14, 2023
This PR fixes my mistake in #536. Thanks for @liam-fitzgerald for
flagging that this broke debug builds.
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