Overview
| Comment: | Version 16g has been released. The `set {point}A 1.0 2.0` operation has improved from 1.3 µs to 0.6 µs, and bitwise operators now interpret fields as numeric values. Point 1: `set {T}x a b…` Fast path: This is triggered when the type is a product type consisting entirely of `int`, `double`, or `string` fields, with a number of values matching the number of fields, and no annotated values. Each value is validated in place and then stored directly, without being copied. If a value is rejected, the system falls back to the general path, which provides the standard error message. General path: The constructed content is no longer copied a second time, and the variable is written directly, avoiding a redundant name lookup. New patch `set-type-local-compile.patch`: Within a procedure, `x` is treated as a compiled local variable (applicable only to simple names, excluding those with `::` or parentheses). Benchmarks: `{pi}` (consisting of an `int` and a `string`) has improved from 1.25 µs to 0.63 µs. Other forms—such as those using named fields or nested product types—remain unchanged. Remaining overhead: Performance is currently at 0.6 µs, compared to 0.2 µs for `X is point = (…)`. This gap is primarily due to the call to `::tcl::annotraw`, which creates and subsequently releases an annotated object during every execution, while also re-reading the type definition. The next logical step would be to compile `set {T}x` in a way that eliminates this call. Point 2: Bitwise operators New patch `expr-champs-bits.patch`: When `$a(x)` is used with bitwise operators (`&`, `|`, `^`, `<<`, `>>`, or `~`), it is now compiled into a `loadFieldNum` operation. Attempting to use a `double` field in this context results in the same error as before. Verifications Test t89_set_type_rapide: output is identical to v16b, regardless of whether TCL_TYPES_COMPACT is set to 0 or 1. tests_tclsh suite: all 67 tests pass in both configurations. valgrind: clean, aside from the usual warning from executable_pe.tcl upon exit. make test: 61 failures—the same as in the reference set. maj.sh: tested on a v16f source tree; it correctly applies the two patches added at the end of ORDRE.txt, and a second run identifies them as already applied. Since both patches affect tclCompExpr.c and tclCompCmdsSZ.c, a full recompilation is required. I have updated the documentation (core/README.md, REPRISE.md, and section 15 of ANNOTATIONS.fr.md) and marked the corresponding item as complete in the project schedule. typeparse.zip and REPRISE.md are attached. |
|---|---|
| Timelines: | family | ancestors | descendants | both | tip-764_tcl90 |
| Files: | files | file ages | folders |
| SHA3-256: |
2cbd5d6000a779de75afe5b6f0f0728e |
| User & Date: | Florentis on 2026-10-25 18:18:22.042 |
| Other Links: | branch diff | manifest | tags |
Context
|
2026-10-26
| ||
| 04:24 | Version 16h is ready: your declaration will now be accepted, and it works for any number of dimensio... check-in: 1972295ee9 user: Florentis tags: tip-764_tcl90 | |
|
2026-10-25
| ||
| 18:18 | Version 16g has been released. The `set {point}A 1.0 2.0` operation has improved from 1.3 µs ... check-in: 2cbd5d6000 user: Florentis tags: tip-764_tcl90 | |
| 13:49 | The two regressions have been addressed in v16f. `lassign $it(*)` has returned to its previous perfo... check-in: 7a6b2e2ffd user: Florentis tags: tip-764_tcl90 | |
Changes
Modified generic/tclCompCmdsSZ.c
from [7c55f2043b]
to [34850cd5d6].
[diff]
Modified generic/tclCompExpr.c
from [9fd47ace57]
to [85b658ad2d].
[diff]
Modified generic/tclTypedVar.c
from [1a1128e0d2]
to [8191e12a21].
[diff]
Modified generic/tclTypes.h
from [6b603cf879]
to [d328674a3b].
[diff]
Modified typeparse/REPRISE.md
from [a461f72d3d]
to [e1d756c82d].
[diff]
Modified typeparse/VERSION
from [f53527d21a]
to [ae47b74d19].
[diff]
Modified typeparse/doc/ANNOTATIONS.fr.md
from [11a1750550]
to [7657faa702].
[diff]
Modified typeparse/noyau/LISEZMOI.md
from [300ce1dde0]
to [e8afe0c23b].
[diff]
Modified typeparse/noyau/ORDRE.txt
from [15b4a00c1f]
to [9296fdbe48].
[diff]
Added typeparse/noyau/expr-champs-bits.patch version [dee9668d5c].
Added typeparse/noyau/set-type-local-compile.patch version [b6d998dedd].
Modified typeparse/tclTypedVar.c
from [1a1128e0d2]
to [8191e12a21].
[diff]
Modified typeparse/tclTypes.h
from [6b603cf879]
to [d328674a3b].
[diff]
Added typeparse/tests_tclsh/t89_set_type_rapide.out version [e6d641f247].
Added typeparse/tests_tclsh/t89_set_type_rapide.tcl version [5b2477a7fa].