tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

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

Core: fuse list pipelines inside if/match arms (issue #198)

ANF lowers an arm's value to a let-bound block, and Fuse::chain() only
descended into a chain's end switch — a range |> map |> filter |> fold
in an arm (tests/compare/lists.lse's) compiled unfused. Descend into
Value::Block values too, scoping the block's bindings to it; a producer
bound outside a block may be consumed inside it, its let dropped all
the same: a block runs at most once where it stands, so under the
purity gates the fused stage runs no more often than the unfused one —
only later, and maybe not at all (divergence may decrease, never
increase, as in GHC).

lists.lse: 0.42 s / 37.6 MB peak -> 0.09 s / 6.4 MB peak, same output.

olivier · il y a 1 mois · 272f3e27d56c1a2e94d0c59361d8e8516fa3d67e

Parents 5859486

2 fichiers modifiés, 189 ajouts, 4 suppressions

Mcrates/louise_core/src/opt/fuse.rs+45−4
Mcrates/louise_core/tests/fuse.rs+144−0