Skip to content

Conversation

@jaapio
Copy link
Member

@jaapio jaapio commented Sep 20, 2025

  • array_walk is slower than a foreach, so buffer now uses foreach.
  • By caching some of the inline node parsers we can strip out about 9% of
    the overhead in the inline parser, as we do not have to check them for every token.

@jaapio jaapio changed the title Optimizations Micro optimizations Sep 20, 2025
@jaapio jaapio requested a review from linawolf September 21, 2025 07:44
Copy link
Contributor

@linawolf linawolf left a comment

Choose a reason for hiding this comment

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

This looks good to me, thank you!

- array_walk is slower than a foreach, so buffer now uses foreach.
- By caching some of the inline node parsers we can strip out about 9% of
  the overhead in the inline parser, as we do not have to check them for every token.
By sorting every call, we are just pumping up the system.
There is no need to do this, only when we need the files.
@jaapio jaapio force-pushed the optimizations branch 2 times, most recently from 70c6073 to 2d90f0e Compare October 16, 2025 21:17
@jaapio jaapio enabled auto-merge October 16, 2025 21:18
@jaapio jaapio merged commit 813a175 into main Oct 16, 2025
49 checks passed
@jaapio jaapio deleted the optimizations branch October 16, 2025 21:31
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.

3 participants