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

chore: use &'static str for chip names as much as possible #1835

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

nhtyy
Copy link
Collaborator

@nhtyy nhtyy commented Dec 3, 2024

Returning a string is an allocation, Ive at least gotten rid of it for basic comparsions but it could still use a clean up, honestly might better to make a ChipName enum.

@nhtyy nhtyy changed the title fix: use &'static str for chip names as much as possible chore: use &'static str for chip names as much as possible Dec 3, 2024
@nhtyy
Copy link
Collaborator Author

nhtyy commented Dec 3, 2024

Still work to do around this if were supportive of continuing to use strings, ie: anywhere I call to_string

If we changed to an enum I think we could even have const name(&self) -> ChipName

Copy link

github-actions bot commented Dec 3, 2024

SP1 Performance Test Results

Branch: n/air_name_as_str
Commit: c165917
Author: nhtyy

program cycles execute (mHz) core (kHZ) compress (KHz) time success
fibonacci 11291 0.17 2.87 0.46 25s
ssz-withdrawals 2757356 17.32 126.33 34.84 1m19s
tendermint 12593597 6.65 267.73 99.64 2m8s

@nhtyy nhtyy force-pushed the n/air_name_as_str branch from edf5418 to bc4aca3 Compare December 3, 2024 02:54
@nhtyy nhtyy added perf Enhances the performance of SP1 core Issues or PRs relating to SP1 core next-release A PR or an issue that should resolved before the next major release labels Dec 4, 2024
@nhtyy nhtyy removed the next-release A PR or an issue that should resolved before the next major release label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues or PRs relating to SP1 core perf Enhances the performance of SP1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant