Skip to content

bench: add reproducible engine and context shaping workload - #1013

Merged
sidkmenon merged 1 commit into
mainfrom
sm/diffr-engine-bench
Oct 8, 2026
Merged

sidkmenon merged 1 commit into
mainfrom
sm/diffr-engine-bench

Conversation

@sidkmenon

Copy link
Copy Markdown
Contributor

Imports devdotfast/diffr#103 by @milanb17 into the monorepo, unchanged except for the diffr/ path.

cargo bench --bench engine in diffr/. See diffr/docs/benchmarks.md.

@sidkmenon
sidkmenon added this pull request to stack #1015 October 8, 2026 05:31
@sidkmenon
sidkmenon force-pushed the sm/diffr-engine-bench branch from c328793 to 4d94b16 Compare October 8, 2026 15:55
Base automatically changed from codex/reapply-diffr-after-release to main October 8, 2026 16:12
Benchmark query compilation, full core/shape processing, and isolated context shaping with Criterion and bundled PR998 inputs. Document timing boundaries and plugin rebuild requirements.

Imported from devdotfast/diffr#103.

AI-assisted: OpenAI Codex.
Agent-Session: fb96350b-c19e-48f0-b364-31e9ad2b72f4
Agent-Session: 01a1196d-bad4-7f61-bafc-f63d12217676
Agent-Session: 7d7ac281-cc4b-4437-9e1e-3872651e8bcf
Agent-Session: a7af3b88-3bb7-48a2-ae20-7626a83628a1
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: 01a11c34-48e4-7ec1-bb72-2c496acb90dc
Agent-Session: 01a11c3d-70b4-7df1-be1a-f0e12840fadf
@sidkmenon
sidkmenon force-pushed the sm/diffr-engine-bench branch from 4d94b16 to 29ef2b3 Compare October 8, 2026 16:14
@sidkmenon
sidkmenon merged commit 81c422d into main Oct 8, 2026
34 checks passed
@sidkmenon
sidkmenon deleted the sm/diffr-engine-bench branch October 8, 2026 16:14
sidkmenon added a commit that referenced this pull request Oct 8, 2026
The plugin cursor searched both trees on most calls. Three commits:

1. Read leaf partners (`pair`, from #1014) instead of rebuilding the
other side's alignment ids per call.
2. Index regions by id: side, parent and path. `cut` and `join` keep it
current. No behavior change.
3. Index fold states, for `linked_regions`, `set_collapsed` and `link`.

`cargo bench --bench engine` (#1013), before → after:

| benchmark | before | after |
|---|---|---|
| `shape/pr998/context` | 1.575 s | 64 ms |
| `engine/pr998/default` | 2.00 s | 233 ms |
| `engine/pr998/no_context` | 148 ms | 118 ms |

Tests: diffr-core cursor, present and protocol units; plugin tests;
context goldens for rust, go, typescript and tsx. The full `cargo test`
suite was not run.
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