Repository navigation
book: a faster shape is measured beside its neighbours, and a mutant is one when the built program differs - #745
Open
closer-claudio wants to merge 2 commits into
Open
closer-claudio wants to merge 2 commits into
closer-claudio wants to merge 2 commits into
Conversation
The testing chapter has a benchmark run before and after a change to the hot path, on the shape the consumer runs. An image writer replaced a walk of the whole tree with a kept list of a file's other names: removing the first names of 16,000 linked files went from 1.27 s to 3 ms. The shape beside it, many names of one file, never made the walk; with each removed name taken out of the list it would have cost the square of the names. It shipped measured on four neighbouring shapes, against the base, with the list left alone on such a removal. One sentence in the chapter's item on speed, and the case in the Go chapter's table. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: closer-claudio <claudio@farcloser.world>
The mutation paragraph said a mutant is one only when the mutated tree differs, and that the diff is the positive control. A day later a mutant with a correct diff was none: a leak planted in C as a bare malloc(32), its result unread, to prove a growth test sees a leak. clang removes such a call at -O2, cgo's default (checked here: one call to malloc at -O0, none at -O2, one when the result goes to a volatile pointer). The test passed under it, and that was the only sign. The paragraph now says what each check shows: the diff, that the edit was made; the figures the test prints under the mutant, that the edit reached the binary. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: closer-claudio <claudio@farcloser.world>
closer-claudio
enabled auto-merge
November 23, 2026 08:36
Contributor
Author
|
Reviewed at e3421e9 |
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.
🎯 Why
Two gaps in the testing chapter, each met in a change last night.
malloc(32), its result unread, was removed by the compiler; the test it was meant to fail passed, and the diff read right (Audit the repository forkcloser/taciturn#98).🛠️ What
🧪 How
malloc(32)is one call at-O0and none at-O2, which is cgo's default; with the result stored through a volatile pointer the call stays at-O2.just lintexit 0,just testexit 0,just do security linksexit 0 (550 links, 438 ok, 112 excluded),just do lint commitsexit 0.