tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Codegen: specialise known trait evidence (issue #61)

A Core pass, tilc_core::evidence, run by the C backend before Perceus:
calls of methods projected from constant dictionaries (Num<Int>,
Ord<String>, ...) become direct calls; methods whose body is one extern
call or primitive are inlined; constrained functions called with
constant dictionaries get a copy per dictionary combination, in which
the same applies (recursively, with recursion reusing its copy; at most
one copy per function of the program in total); unused projections and
dictionary reads are removed. Values keep their uniform representation.

The interpreter still runs Core as lowered, so the differential tests
check the pass; tests/run/specialise.til covers polymorphic recursion,
two levels of passing, methods as closures and derived dictionaries.
TILC_NO_SPECIALISE turns the pass off.

tests/bench, user-space cycles, best of 5 interleaved: arith -71%,
effects -33%, dict -22%, lists -8%, html and messages -1%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

olivier · il y a 1 mois · c6edab42a76cf6787ee9b0d7477b6dc422cf6bfe

Parents f47b510

7 fichiers modifiés, 650 ajouts, 3 suppressions