Skip to content

Conversation

@CPunisher
Copy link
Member

Description:

u8 is enough for this field. Actually there are two more optimization we probably can do:

  1. unresolved_ctxt is rarely changed so we can avoid copying it when copying ExprCtx.
  2. On the top of point 1, the remaining fields can be compacted into a u8

But I don't want to do them, since they will make code messier and less extendable.
This pr makes ExprCtx from 12 bytes to 8 bytes. 8 bits = 64 bits is good enough for now.

@CPunisher CPunisher requested a review from a team as a code owner July 11, 2025 16:21
@changeset-bot
Copy link

changeset-bot bot commented Jul 11, 2025

⚠️ No Changeset found

Latest commit: 5798f7b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 11, 2025

CodSpeed Performance Report

Merging #10833 will not alter performance

Comparing CPunisher:07-11-perf/u8-remaining-depth (5798f7b) with main (66ae1e8)

Summary

✅ 140 untouched benchmarks

@kdy1 kdy1 enabled auto-merge (squash) July 11, 2025 17:40
@kdy1 kdy1 merged commit ed6956a into swc-project:main Jul 11, 2025
317 of 320 checks passed
@kdy1 kdy1 modified the milestones: Planned, v1.12.12 Jul 11, 2025
@swc-project swc-project locked as resolved and limited conversation to collaborators Aug 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants