Skip to content

perf: reduce concatenation for optional properties - #880

Merged
Tony133 merged 1 commit into
mainfrom
perf/optional-property-prefixes
Sep 8, 2026
Merged

perf: reduce concatenation for optional properties#880
Tony133 merged 1 commit into
mainfrom
perf/optional-property-prefixes

Conversation

@gurgunday

Copy link
Copy Markdown
Member
  • Combines the comma and property name into one string when the schema is compiled

This results in one fewer concatenation per subsequent supplied property, repeated across every object

   Existing benchmark                                           Node 24    Node 26
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  ━━━━━━━━━  ━━━━━━━━━
   object with properties of different types                     +16.1%     +14.1%
  ───────────────────────────────────────────────────────────  ─────────  ─────────
   short array of objects with properties of different types      +1.4%      +8.8%

Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
@gurgunday
gurgunday requested a review from a team September 8, 2026 18:03

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@Tony133 Tony133 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@Tony133
Tony133 merged commit de5dd5b into main Sep 8, 2026
20 checks passed
@Tony133
Tony133 deleted the perf/optional-property-prefixes branch September 8, 2026 20:11
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