Skip to content

p-token: Tweaks to processors #47

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

Merged
merged 1 commit into from
Mar 25, 2025
Merged

p-token: Tweaks to processors #47

merged 1 commit into from
Mar 25, 2025

Conversation

febo
Copy link
Contributor

@febo febo commented Mar 25, 2025

Problem

p-token processor is divided into "fast" and "normal", where the "fast" is responsible for a small subset of instructions to reduce the number of comparisons to determine which instruction to execute. Instructions that are not placed on the "fast" tend to have CU overhead, therefore popular instructions such as transfer_checked, burn and burn_checked should be placed on the "fast" path.

Solution

Move transfer_checked, burn and burn_checked to the "fast" processor. This PR also removes inline attributes of some processors where there are no gains in CUs for doing that.

@febo febo marked this pull request as ready for review March 25, 2025 14:15
@febo febo requested a review from joncinque March 25, 2025 14:15
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks great!

By the way, did you ever try testing with codegen-units = 1 to see if it helped CU usage or binary size at all? https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units

@febo
Copy link
Contributor Author

febo commented Mar 25, 2025

Looks great!

By the way, did you ever try testing with codegen-units = 1 to see if it helped CU usage or binary size at all? https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units

I did – there were no differences to the CU nor binary size.

@febo febo merged commit 299ac7e into main Mar 25, 2025
15 checks passed
@febo febo deleted the febo/processor branch March 25, 2025 17:35
@joncinque
Copy link
Contributor

Gotcha, thanks for the info!

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