Skip to content

An attempt at making hxcpp.h parse faster#1303

Merged
Aidan63 merged 4 commits into
HaxeFoundation:masterfrom
Aidan63:faster-hxcpp-h
Jun 20, 2026
Merged

An attempt at making hxcpp.h parse faster#1303
Aidan63 merged 4 commits into
HaxeFoundation:masterfrom
Aidan63:faster-hxcpp-h

Conversation

@Aidan63

@Aidan63 Aidan63 commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Clang compiler timings do show a ~1s reduction in parse time but this doesn't seem to have had any effect on CI times so I guess it's limited else where now.

The main change is making the two templated types in FieldRef.h non-templated by using hx::Val instead as this header was the biggest culprit time wise.

Given that this doesn't really improve things over all I'm not sure we want these changes, I'll keep it open for a while though in case I get any other ideas.

Aidan Lee added 2 commits January 30, 2026 22:12
Only used by non templated ArrayBase class
All uses of this headers functions are already guarded behind that define. It has a surprising time cost due to std::vector.
@tobil4sk

tobil4sk commented Feb 4, 2026

Copy link
Copy Markdown
Member

this doesn't seem to have had any effect on CI times so I guess it's limited else where now.

Since pre-compiled headers are used, maybe the cost is only paid once?

@skial skial mentioned this pull request Feb 10, 2026
1 task
@Aidan63

Aidan63 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

I've reverted the Val change since it doesn't seem to make any difference with pch, so all that's left is moving the sorter class out of the header, which is more of a code tidy up than anything so I'll still merge it.

@Aidan63 Aidan63 merged commit aafc1d4 into HaxeFoundation:master Jun 20, 2026
265 of 266 checks passed
@Aidan63 Aidan63 deleted the faster-hxcpp-h branch June 20, 2026 15:59
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