kernel_cost.bend checks
raw source on the hub · import stelliferous@0.0.2.0/kernel_cost.bend as Kernel_cost
Prediction parameters, not machine bounds or correctness certificates. The worker count is not a profile value: callers pass the runtime's pool size.
1 import
import Base
Types
type Configuration source · line 5 · raw
Data
Configuration@mac_ns:F32 -> @copy_byte_ns:F32 -> @operation_ns:F32 -> @grain_ns:F32 -> @wake_round_ns:F32 -> Configuration
Definitions
def element_ns source · line 11 · raw
@+bytes:F32 -> @+operations:F32 -> @config:Configuration -> F32
One element's cost. Bytes price loading, storing and the loop that moves them, as the copies that measured copy_byte_ns do; operations are the other scalar work, counted from source.
def region_ns source · line 21 · raw
@+workers:U32 -> @+leaves:U32 -> @+span:F32 -> F32
The official runtime grows fork tasks and queues fork-free tasks for its work round (monk_step, row_grow, cube_run). No fixed number of leaves can be subtracted as already completed by growth. Price complete waves of at most workers leaves, using the largest path (including clones) per wave. This is a conservative scheduling estimate, not a bound on the runtime's static ring distribution. Callers charge the two wake rounds separately.