Skip to content

Conversation

@wesm
Copy link
Member

@wesm wesm commented Jun 1, 2020

This refactors diff.cc slightly to instantiate fewer templates.

On my machine with clang-8:

  • Before: 15.5s compilation time of diff.cc in -03, 1633704 bytes of object code
  • After: 4.1s compilation time, 498328 bytes of object code

There are probably more improvements here both in compilation time and code size but cutting 10 seconds out of release builds is already a good improvement.

@wesm wesm requested a review from bkietz June 1, 2020 00:49
@github-actions
Copy link

github-actions bot commented Jun 1, 2020

@wesm
Copy link
Member Author

wesm commented Jun 1, 2020

FTR it seems like the custom value formatters here could be merged with some code elsewhere in the codebase (Scalar::ToString?) since they are among the largest symbols in this file

https://gist.github.com/wesm/9d4c5850d218ef722a77825f1da6f991

Copy link
Member

@bkietz bkietz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@bkietz bkietz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, wrong button

@wesm wesm force-pushed the diff-compile-faster branch from b864b34 to 40f235d Compare June 1, 2020 16:31
@bkietz bkietz closed this in d7fd852 Jun 1, 2020
@wesm wesm deleted the diff-compile-faster branch June 7, 2020 17:12
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.

2 participants