Env copy on write - #1405
Open
TristonianJones wants to merge 6 commits into
Open
Conversation
| Benchmark Case | Before (ns/op) | After (ns/op) | Δ Time | Before (B/op) | After (B/op) | Δ Memory | Before (allocs) | After (allocs) | Δ Allocs | | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | BenchmarkProgramPlan/Default | 8,153 | 930 | **-88.6%** | 8,320 | 1,416 | **-83.0%** | 36 | 26 | **-27.8%** | | BenchmarkProgramPlan/OptimizeUnneeded | 7,344 | 1,150 | **-84.3%** | 8,784 | 1,512 | **-82.8%** | 50 | 32 | **-36.0%** | | BenchmarkProgramPlan/OptimizeNeeded | 8,370 | 2,164 | **-74.1%** | 10,224 | 2,976 | **-70.9%** | 67 | 52 | **-22.4%** |
TristonianJones
force-pushed
the
env-copy-on-write
branch
from
August 6, 2026 23:10
9d8d1cc to
aa724f3
Compare
l46kok
reviewed
Aug 7, 2026
Comment on lines
136
to
138
| for scope.parent != nil { | ||
| scope = scope.parent | ||
| } |
Collaborator
There was a problem hiding this comment.
Should this be updated to check for inherited scope as well?
|
|
||
| // Validators returns the set of ASTValidators configured on the environment. | ||
| func (e *Env) Validators() []ASTValidator { | ||
| return e.validators[:] |
Collaborator
There was a problem hiding this comment.
Should you be copying the validators similar to Macros() above instead of slicing?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce copy-on-write semantics for checker/env.go
Closes #1398