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

Optimize for size, while unrolling the hottest loops #308

Merged
merged 3 commits into from
May 7, 2020

Conversation

kazuho
Copy link
Member

@kazuho kazuho commented May 7, 2020

The attempt of this PR is to reduce the code size while manually unrolling the loops, as sugessted by @herumi.

While manual unrolling does not provide performance improvement on my testbed (Core i5 9400, Ubuntu 19.10), we see comparable performance with less than half the code size.

object size 1440 bytes 16384 bytes
original (-O3) 5696 0.293 2.804
original (-O2 -fno-unroll-loops) 4480 0.332 3.245
this PR (-O3) 5808 0.294 2.813
this PR (-O2 -fno-unroll-loops) 2480 0.297 2.893

Object sizes are in bytes, other cells are in seconds (i.e. smaller the better). In addition to the command options listed above, -DNDEBUG -march-native were used in common.

@kazuho kazuho merged commit cd0b7f0 into kazuho/fusion May 7, 2020
herumi added a commit to herumi/test-picotls that referenced this pull request May 7, 2020
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