File
typeparse/VERSION
— part of check-in
[7a6b2e2ffd]
at
2026-10-25 13:49:02
on branch tip-764_tcl90
— 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.
(user:
Florentis,
size: 5)
[annotate]
[blame][check-ins using]