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

backend: dwarfdbginf: Use LEB128 encoding for lines and columns #13246

Merged
merged 1 commit into from Jan 7, 2022

Conversation

ljmf00
Copy link
Member

@ljmf00 ljmf00 commented Oct 31, 2021

Using variable length form for lines and columns in debug info can decrease
binary size from 1.04% for 16-bit and 3.06% for 32-bit according to my tests.
These numbers were based on 100 000 functions with 4 variables. Increasing the
line count makes less difference, increasing the variable count makes more
difference. Overall it reduces the binary size on all tests.

This adds the LEB128 encoding overhead however a SIMD implementation can be
taken to consideration since the current implementation uses manual for loop.

Signed-off-by: Luís Ferreira contact@lsferreira.net


This is related to what @WebFreak001 requested on #13204 .

Using variable length form for lines and columns in debug info can decrease
binary size from 1.04% for 16-bit and 3.06% for 32-bit according to my tests.
These numbers were based on 100 000 functions with 4 variables. Increasing the
line count makes less difference, increasing the variable count makes more
difference. Overall it reduces the binary size on all tests.

This adds the LEB128 encoding overhead however a SIMD implementation can be
taken to consideration since the current implementation uses manual for loop.

Signed-off-by: Luís Ferreira <contact@lsferreira.net>
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ljmf00!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#13246"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants