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

cmd/compile: use runtime.zeroVal for small zero-valued readonly static vars #23948

Open
josharian opened this Issue Feb 20, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@josharian
Contributor

josharian commented Feb 20, 2018

Split out from #23929. No reason to have lots of different zero-valued readonly symbols when we can re-use runtime.zeroVal.

@mvdan

This comment has been minimized.

Member

mvdan commented Feb 20, 2018

Is this for performance, or to reduce binary size? Or perhaps both?

@bradfitz bradfitz added this to the Unplanned milestone Feb 20, 2018

@martisch

This comment has been minimized.

Member

martisch commented Feb 20, 2018

Likely both.

@josharian

This comment has been minimized.

Contributor

josharian commented Feb 20, 2018

Performance: lower cache impact of reading zero values.

Binary size: fewer symbols.

Toolspeed: less to link.

I’d expect very minor improvements on all three.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment