Artifact 52996e26257789ffdcd069741027221206d9eb84ea452c70d822b0a4975f209a:
- File typeparse/noyau/ORDRE.txt — part of check-in [4269a60689] at 2026-10-24 13:29:48 on branch tip-764_tcl90 — Point 2 is complete and documented. All that remains is to wait for Valgrind and the full Tcl test suite—which are currently running in the background (taking about 40 minutes)—before sending the zip file. Previous behavior: Each read operation `$a(x)` would look up the field by its name and follow general path-resolution rules. Subsequently, `expr` would receive a typed value, causing it to exit its optimized "fast path" for numeric operations. Changes: Field caching: The index of a compiled read (the `x` in `$a(x)`) now stores the previously encountered type and the field's location. Subsequent reads involving the same type proceed directly to the element. Sums, variable links (`var`), and `list.any` continue to use the general path-resolution mechanism. Typed numbers in `expr`: An operand typed as `int` or `double` is now read directly from its underlying content. This is implemented via a new core patch, `expr-nombres-types.patch` (in `tclExecute.c`). The result is never written back into the operand; thus, a variable such as `{double}d` remains unchanged—a fact verified by the test suite. Measurements (10,000 points): Bare Tcl v15s current reading $a(x) within expr 0.05 µs (lindex) ≈ 0.52 µs 0.14 µs foreach a $P {set s [expr {$s + $a(x)}]} 0.64 ms 5.2 ms 1.5 ms Geometry, performance gap relative to the baseline (bare Tcl): calculation v15s v15u v15v area / 3.4 / 2.2 / 1.8 perimeter / 2.7 / 1.9 / 2.1 bounding box / 6.7 / 3.7 / 3.0 inside_all / 3.6 / 2.6 / 2.1 Bézier / 2.7 / 2.4 / 2.4 The perimeter figure shows a slight regression, from / 1.9 to / 2.1. This is likely measurement noise; this calculation primarily involves procedure calls. What remains during the read operation is the creation and subsequent release of the field's typed value. Eliminating this would require the `expr` command to know—at compile time—that it only requires a numeric value, which is a separate, more complex undertaking. Verified so far: All 54 tests pass, including the new `t76_lecture_champ` (field read) test, which produces the same output as it did before the change. Results are identical whether the compact form is used or not. (user: Florentis, size: 1164) [annotate] [blame] [check-ins using]
# Patchs C à appliquer sur l'arbre, dans cet ordre (un par ligne, # = commentaire). # maj.sh détecte seul ceux qui sont déjà appliqués. Les nouveaux patchs s'ajoutent à la fin. # C patches to apply to the tree, in this order. maj.sh detects the ones already applied. types-binaires-linkdepth.patch types-binaires-referentiel.patch types-binaires-taille-dynamique.patch types-binaires-annotations-locales.patch types-binaires-type-binary-annote.patch types-binaires-nom-type-binary.patch types-binaires-set-annotation-locale.patch types-binaires-notes.patch types-binaires-notes-typeget.patch types-binaires-cast-constructeur.patch types-binaires-convert-famille.patch types-binaires-codec-c.patch types-binaires-codec-c-decode.patch types-chemins-construction.patch types-chemins-depliage.patch index-chemins-noyau.patch types-chemins-atomes.patch types-produit-etiquettes.patch contrat-par-nom.patch elements-atomiques.patch cast-collection.patch eias-string-is.patch chemins-modification.patch set-nom-substitue.patch lset-reference.patch tip759-memoire.patch compact-conversions.patch procedures-typees.patch boucles-typees.patch expr-nombres-types.patch