Skip to content

Comments

Optimize for size, while unrolling the hottest loops#308

Merged
kazuho merged 3 commits intokazuho/fusionfrom
kazuho/fusion-O2
May 7, 2020
Merged

Optimize for size, while unrolling the hottest loops#308
kazuho merged 3 commits intokazuho/fusionfrom
kazuho/fusion-O2

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