Artifact 8c38d5973f2170deccdccc3566d0b8da73e510a9ce055c3b7596a8e314fab7bd:
- File typeparse/tests_tclsh/t75_boucles_typees.out — part of check-in [92c0c64aa5] at 2026-10-24 13:16:58 on branch tip-764_tcl90 — Version v15u is included in typeparse.zip. Loops over a typed list no longer recreate their elements, and the "annotated" step shows performance gains across the board in the geometry benchmark. Difference compared to plain Tcl (10,000 points): calculation v15s v15u area / 3.4 / 2.2 perimeter / 2.7 / 1.9 bounding box / 6.7 / 3.7 contains_all / 3.6 / 2.6 Bézier / 2.7 / 2.4 For 10,000 points, an empty `foreach` loop improves from 2.6 ms to 0.24 ms (plain Tcl: 0.16 ms). The change affects two core files: `tclExecute.c` and `tclCmdAH.c`. These are included in the new `boucles-typees.patch` (typed-loops patch), which has been added to the end of `ORDRE.txt`. All checks pass: the 53 tests—including the new `t75_boucles_typees`—produce the same output as before the change; output remains identical whether the compact form is used or not; `valgrind` reports no issues in either mode; the full Tcl test suite shows the same 61 failures as in v15. I have updated `noyau/LISEZMOI.md`, `ANNOTATIONS.fr.md` (section 15), the `LISEZMOI.md` file for the geometry component, `REPRISE.md`, and the project schedule. Within the loops, the primary remaining overhead comes from path-based lookups (e.g., `$q(x)`), which take approximately 0.2 µs each, compared to 0.06 µs for an index-based lookup. This corresponds to point 2: implementing a cache at the point of the lookup within the bytecode. (user: Florentis, size: 598) [annotate] [blame] [check-ins using]
proc foreach : point point point global foreach : point point point eval foreach : point point point lmap $q(x) : 0 1 1 apply lmap : 0 1 2 après la boucle : 1 1 point deux variables : 0 0 (point) / 1 0 (point) deux variables : 1 1 (point) / () u=point v=point w=point sous contrat : {1 1} point 0 abc modifiée : 3 6 point copie partagée : point somme : forme.p forme.r liste nue : {{a b} {}} {{c d} {}} liste de listes : {{1 2} list<int>} {{3 4} list<int>} liste vide : 0 chaîne inchangée : {0 0} {1 0} {1 1}