Skip to content

perf: replace stream pipelines with explicit loops in hot paths#8750

Open
1wairesd wants to merge 3 commits into
SkriptLang:dev/patchfrom
1wairesd:patch/perf-replace-stream-pipelines
Open

perf: replace stream pipelines with explicit loops in hot paths#8750
1wairesd wants to merge 3 commits into
SkriptLang:dev/patchfrom
1wairesd:patch/perf-replace-stream-pipelines

Conversation

@1wairesd

@1wairesd 1wairesd commented Jul 3, 2026

Copy link
Copy Markdown

Problem

Solution

Testing Completed

Supporting Information


Completes: none
Related: none
AI assistance: none

@1wairesd 1wairesd requested review from a team as code owners July 3, 2026 11:18
@1wairesd 1wairesd requested review from Burbulinis and UnderscoreTud and removed request for a team July 3, 2026 11:18
@skriptlang-automation skriptlang-automation Bot added needs reviews A PR that needs additional reviews needs triage An issue that hasn't been classified or verified yet labels Jul 3, 2026
@skriptlang-automation

skriptlang-automation Bot commented Jul 3, 2026

Copy link
Copy Markdown

🔍 Triage Checklist

Type

  • bug
  • feature
  • enhancement

Project

  • 2.15 Releases
  • 2.16 Releases
  • 2.17 Releases

  • ✅ Mark as triaged

@TheMug06

TheMug06 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

You don't have to open multiple PRs, you can stay in the original one :)

@1wairesd

1wairesd commented Jul 3, 2026

Copy link
Copy Markdown
Author

I've added two test files:

GetTriggersCorrectnessTest — verifies the loop produces identical results to the stream version (same triggers, same order, deduplication, inheritance matching).
GetTriggersBenchmark — a standalone benchmark runnable via main() with a sink variable to prevent dead code elimination. Results on JDK 21:

изображение

The gain is most pronounced in the common case. I'm aware this isn't JMH — happy to add a proper JMH benchmark if you'd prefer that over this approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs reviews A PR that needs additional reviews needs triage An issue that hasn't been classified or verified yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants