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

[CANGEN/Daedalus] - Optimize vec allocation #97

Open
harrison-e opened this issue Jan 11, 2025 · 0 comments
Open

[CANGEN/Daedalus] - Optimize vec allocation #97

harrison-e opened this issue Jan 11, 2025 · 0 comments

Comments

@harrison-e
Copy link
Contributor

Description

Right now, the Daedalus sub-functions in libs/calypso-cangen/ are poorly optimized. Particularly, in can_gen_decode.rs, the code generated reuses one Vec named decoded_points, which is cloned into each new DecodeData for the return value, and then cleared for its next use. This is inefficient!!

Acceptance Criteria

Functionality of Daedalus is preserved, without using/reusing decoded_points.

Proposed Solution

One idea is to make a new Vec for each NetField and use that in the construction of the DecodeData struct for the result. It shouldn't be super hard to figure this one out though so I will leave the fun to whoever wants this ticket!

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

No branches or pull requests

1 participant