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

Use []byte("...") instead of []byte{...}. #1

Merged
merged 1 commit into from
Jan 14, 2017

Conversation

stapelberg
Copy link
Contributor

This approach fares more favorable in a number of resource consumption
dimensions:

• an 11M input file results in 41M instead of 61M of Go source
• compilation uses a few megabytes instead of gigabytes of RAM
• compilation time is reduced from 25s to <1s

I verified correctness by printing the md5 checksum of the file compiled
with the previous commit and this commit; they match. The startup
overhead of the string conversion is not measurable on my machine.

This approach fares more favorable in a number of resource consumption
dimensions:

• an 11M input file results in 41M instead of 61M of Go source
• compilation uses a few megabytes instead of gigabytes of RAM
• compilation time is reduced from 25s to <1s

I verified correctness by printing the md5 checksum of the file compiled
with the previous commit and this commit; they match. The startup
overhead of the string conversion is not measurable on my machine.
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.

None yet

2 participants