Skip to content

Commit 98577dd

Browse files
committed
Update CONTRIBUTING.md
1 parent 2656b12 commit 98577dd

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,7 @@ from the clone passed to gs1-cc.
805805
- Fuse related per-position outputs into one traversal, testing the shared per-position predicate once (build the mask layers together, testing data-vs-function module membership once per module; see `hanxin`, `qrcode`).
806806
- Skip a transform whose result is a known no-op rather than computing it (the identity mask yields an all-zero layer, so evaluate the unmasked symbol directly; see `hanxin`).
807807
- Classify positions in a hot scan by indexing a static string with a small per-position code, spilling to variables only on the rare matching branch (stem-corner detection in the region trace; see `renmatrix`).
808+
- Hoist a traversal whose result is candidate-invariant out of the per-candidate loop (the codeword placement walk visits vacant positions in a mask-independent order, so resolve the position sequence once and share it between masks; see `dotcode`).
808809

809810
**Conditional Assignment Pattern**
810811

@@ -934,6 +935,15 @@ per character reaches the fixed point rather than iterating to convergence. See
934935
`azteccode`, whose latch tables are transitively closed.
935936

936937

938+
**Derive per-candidate ECC via code linearity**
939+
940+
Reed-Solomon codes are linear over their field, so when each candidate message
941+
is the base message plus scaled fixed component vectors (e.g. masking adds a
942+
mask codeword and a ramp), compute the ECC of the base message once, cache the
943+
geometry-dependent component ECCs, and derive each candidate's ECC as a cheap
944+
scaled sum — replacing a full Reed-Solomon pass per candidate. See `dotcode`.
945+
946+
937947
### Anti-patterns
938948

939949
- Creating variables (dictionary entries) in hot loops

0 commit comments

Comments
 (0)