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

Trim code size for Printer #6473

Closed
wants to merge 6 commits into from
Closed

Trim code size for Printer #6473

wants to merge 6 commits into from

Conversation

steven-johnson
Copy link
Contributor

@steven-johnson steven-johnson commented Dec 6, 2021

This builds on top of #6472 to de-inline as much of Printer as possible, moving things into a new 'printer' runtime module using a PrinterBase class.

This is, admittedly, a pretty small improvement: comparing before-and-after on OSX for target=host shows only a ~4k reduction in object size (115k -> 111k for runtime.o) but adding targets features with more verbose error reporting and such increases the benefit (eg host-opencl gives a 179k -> 164k reduction for runtime.o).

Since ~all of the usages of Printer in runtime are for error handling, debugging, profiling, or tracing, any possible reduction in performance seems unlikely to be significant.

This builds on top of #6472 to de-inline as much of Printer as possible, moving things into a new 'printer' runtime module using a PrinterBase class.

This is, admittedly, a pretty small improvement: comparing before-and-after on OSX for target=host shows only a ~4k reduction in object size (115k -> 111k for `runtime.o`) but adding targets with more verbose error reporting and such increases the benefit (eg host-opencl gives a 179k -> 164k reduction for runtime.o).

Since ~all of the usages of Printer in runtime are for error handling, debugging, profiling, or tracing, any possible reduction in performance seems unlikely to be significant.
@steven-johnson
Copy link
Contributor Author

Genuinely puzzled at the Windows-specific link errors here.

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.

1 participant