Skip to content

perf: optimize ToJson derive handler#14186

Draft
Kha wants to merge 1 commit into
masterfrom
push-qskrsttklwqs
Draft

perf: optimize ToJson derive handler#14186
Kha wants to merge 1 commit into
masterfrom
push-qskrsttklwqs

Conversation

@Kha

@Kha Kha commented Jun 25, 2026

Copy link
Copy Markdown
Member

Partially evaluate mkObj call to avoid allocations

@Kha Kha requested a review from kim-em as a code owner June 25, 2026 21:27
@Kha

Kha commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

!bench

@leanprover-radar

leanprover-radar commented Jun 25, 2026

Copy link
Copy Markdown

Benchmark results for f60042a against 0a8abcb are in. There are significant results. @Kha

  • 🟥 build//instructions: +2.3G (+0.02%)

Large changes (4✅)

  • vcgen/GetThrowSet/800/kernel//wall-clock: -60ms (-10.12%)
  • vcgen/MatchIota/1000/kernel//wall-clock: -71ms (-16.21%)
  • vcgen/MatchIota/1500/kernel//wall-clock: -169ms (-18.25%)
  • vcgen/MatchIota/500/kernel//wall-clock: -18ms (-12.50%)

Medium changes (2🟥)

  • 🟥 size/all/.c//lines: +53.2k (+0.45%)
  • 🟥 size/all/.ir//bytes: +2MiB (+0.47%)

Small changes (4✅, 33🟥)

Too many entries to display here. View the full report on radar instead.

@Kha Kha marked this pull request as draft June 25, 2026 21:46
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Jun 25, 2026
@leanprover-bot

Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-06-24 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2026-06-25 22:04:12)

@github-actions github-actions Bot added the mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN label Jun 25, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Jun 25, 2026
@mathlib-lean-pr-testing

Copy link
Copy Markdown

Mathlib CI status (docs):

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

Labels

builds-mathlib CI has verified that Mathlib builds against this PR mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants