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

[hlc] Use precompiled headers in vs templates #721

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

tobil4sk
Copy link
Member

Instead of having to recompile the headers for each individual source file, the headers are now compiled once for the whole project. This gives a further speed up from ~7 seconds to ~3 seconds.

@ncannasse
Copy link
Member

ncannasse commented Oct 25, 2024 via email

These are likely to change after recompiling, so it's best to not
include these in the precompiled header or they will cause a full
recompilation when rebuilding
These are disabled in hlc.h, but when precompiling the header the pragma
directives are lost.
@yuxiaomao
Copy link
Collaborator

Tested on shiro's project on my machine. It's better than the current template, and can be useful if we merge; but is still a "big slow down" compared to the 1 file strategy that is currently in use for the project.

Template Time
Current vs2019 template with your /Fo optimization 828-862s (14 mins)
With this PR 330-372s (6 mins)
Current ci template (all-in-one C file, no HL_MAKE) 57-91s (1.5 mins)

(Last week I tested the current template and it takes me 408s (7mins), still worse than this PR but take less time. I suppose the perf is never stable :/)

@Simn
Copy link
Member

Simn commented Oct 28, 2024

Comparing a single-file compilation to this doesn't seem particularly fair. If you do that you'd have to take into the account incremental compilation, which should make a huge difference.

@yuxiaomao
Copy link
Collaborator

Agree. My point is this PR is good and we can merge it.
And the comparison for the single-file is only for comparison, as @tobil4sk discussed with me previously about having a template that can choose to activate single-file compilation with some -D hlgen flag.

@ncannasse
Copy link
Member

ncannasse commented Oct 28, 2024 via email

@yuxiaomao yuxiaomao merged commit 51e0035 into HaxeFoundation:master Oct 28, 2024
10 checks passed
@tobil4sk tobil4sk deleted the speed-up-hlc-templates branch October 28, 2024 21:44
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.

4 participants