Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Make Codegen Faster Through Less Allocations #269

Merged
merged 5 commits into from
Apr 4, 2023

Conversation

ec2
Copy link
Contributor

@ec2 ec2 commented Apr 3, 2023

Overview

Removed a lot of expensive cloning in favour of passing references in the codegen phase. I tried to do this with minimal refactoring.
Codegen is about 75% faster now for the erc20 benchmark.

Thanks for @jimjbrettj for introducing my to Huff, this has been fun and educational.

Before:
Screen Shot 2023-04-03 at 6 34 41 PM

After:
Screen Shot 2023-04-03 at 6 37 18 PM

@ec2 ec2 changed the title Ec2/codegen clones Make Codegen Faster Through Less Allocations Apr 3, 2023
Copy link
Member

@Maddiaa0 Maddiaa0 left a comment

Choose a reason for hiding this comment

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

thank you @ec2 and thank you to @jimjbrettj for introducing you!

Awesome stuff, much cleaner!

@Maddiaa0 Maddiaa0 merged commit 38bc9dc into huff-language:stage Apr 4, 2023
@Maddiaa0 Maddiaa0 mentioned this pull request Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants