Overview
| Comment: | The two regressions have been addressed in v16f. `lassign $it(*)` has returned to its previous performance level. The object-based approach is now the fastest when using the compact format, though it remains slow in the standard format. `$P(*)`: Reading all components of a typed product now utilizes a shortcut when all its fields are simple (i.e., containing no sums, links, or `any` types). The result remains the same as before: a `list.T` if all fields share the same type, or a `list.any` of typed fields otherwise. For a `Sample` with three fields, the execution time drops from 2.4 µs to 0.7 µs. Other cases continue to follow the general processing path. `cstruct.c`: The object-based approach now uses `tclAnnotatedApi.h`, similar to `geo.c`. In the compact format, measurements are read directly from their storage slots. In the standard format, the process still goes through an intermediary layer that requests the full content of the batch from Tcl; only a true stub function would be able to read this content in-place. Measurements (in µs) for a batch of 10,000 items: Step Before (v16e) v16f (standard) v16f (compact) 5b `lassign $it(*)` 15,300 7,600 7,600 7 Object-based `cs::stats_obj` 2,400–2,800 1,900 20 6 Full chain `cs::stats` 1,600 1,200 280 In the compact format, the object-based approach (20 µs) is now faster than the encoding-plus-byte-stream chain (280 µs). It is even as fast as performing the calculation alone on data already available as bytes (17 µs). Verifications: All 66 tests pass, in both the standard and compact formats. The new `t88` test covers the scenarios involving `$P(*)`. The outputs are identical to those of v16b, with the exception of the three tests that count the generated instructions. cstruct/test.tcl produces the same output as v16b in both forms, and Valgrind reports no issues. A full Valgrind run reveals nothing new, and the complete `make test` suite shows the same 61 failures as the reference. |
|---|---|
| Timelines: | family | ancestors | descendants | both | tip-764_tcl90 |
| Files: | files | file ages | folders |
| SHA3-256: |
7a6b2e2ffd9deaf4237ae9a52168e12e |
| User & Date: | Florentis on 2026-10-25 13:49:02.234 |
| Other Links: | branch diff | manifest | tags |
Context
|
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 | |
| 13:02 | I have updated `bench_cstruct.tcl` and re-run it on v16e: in compact mode, the full sequence runs 15... check-in: 23da210385 user: Florentis tags: tip-764_tcl90 | |
Changes
Modified generic/tclTypePath.c
from [a0e17b5e34]
to [97ebca5fd9].
[diff]
Modified generic/tclTypes.c
from [3b28a9e417]
to [7a22ed367f].
[diff]
Modified generic/tclTypes.h
from [9fefbfb43c]
to [6b603cf879].
[diff]
Modified typeparse/REPRISE.md
from [e02fb558dc]
to [a461f72d3d].
[diff]
Modified typeparse/VERSION
from [718caaf4dd]
to [f53527d21a].
[diff]
Modified typeparse/exemples/cstruct/LISEZMOI.md
from [14f40ac691]
to [fc37e7c3a3].
[diff]
Modified typeparse/exemples/cstruct/cstruct.c
from [464cda3a57]
to [7e99167ab6].
[diff]
Modified typeparse/noyau/LISEZMOI.md
from [3780dcda78]
to [300ce1dde0].
[diff]
Modified typeparse/tclTypePath.c
from [a0e17b5e34]
to [97ebca5fd9].
[diff]
Modified typeparse/tclTypes.c
from [3b28a9e417]
to [7a22ed367f].
[diff]
Modified typeparse/tclTypes.h
from [9fefbfb43c]
to [6b603cf879].
[diff]
Added typeparse/tests_tclsh/t88_parties_produit.out version [8d3212d22c].
Added typeparse/tests_tclsh/t88_parties_produit.tcl version [1e1a748ee2].