Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / OptimizeOptions

Interface: OptimizeOptions โ€‹

Defined in: core/ir/datapack/core.ts:31

Output optimization passes. Each is on unless set to false.

Properties โ€‹

dedupe? โ€‹

optional dedupe?: boolean

Defined in: core/ir/datapack/core.ts:48

Merge private functions with identical bodies into one file.


group? โ€‹

optional group?: boolean

Defined in: core/ir/datapack/core.ts:35

Move runs of lines with the same execute prefix into one function call.


inferTypes? โ€‹

optional inferTypes?: boolean

Defined in: core/ir/datapack/core.ts:42

Add type= to @e/@n selectors whose tags the pack only gives one entity type.


inline? โ€‹

optional inline?: boolean

Defined in: core/ir/datapack/core.ts:33

Fold one-command private functions into their callers.


internReads? โ€‹

optional internReads?: boolean

Defined in: core/ir/datapack/core.ts:44

Write each /compute score read used more than once as a registered provider's id.


reorderForks? โ€‹

optional reorderForks?: boolean

Defined in: core/ir/datapack/core.ts:40

Let grouping run a forked execute prefix's lines whole per entity even when they reach past @s, assuming no entity depends on another's order.


splitChains? โ€‹

optional splitChains?: boolean

Defined in: core/ir/datapack/core.ts:53

Turn an if/elif chain of 16+ branches on one score into a binary search over its ranges, so a late branch costs a few checks instead of one per branch before it.


unroll? โ€‹

optional unroll?: boolean

Defined in: core/ir/datapack/core.ts:46

Write fixed-count loops (repeat, while with max) out in place when the copies are small.

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.