A default cost model for SFL for SetType=BitSet<64>, based on benchmarks.

Synopsis

Declared in <cluster_linearize.h>

class SFLDefaultCostModel;

Description

The numbers here were obtained in February 2026 by:

  • For a variety of machines:

  • Running a fixed collection of ~385000 clusters found through random generation and fuzzing, optimizing for difficulty of linearization.

  • Linearize each ~3000 times, with different random seeds. Sometimes without input linearization, sometimes with a bad one.

  • Gather cycle counts for each of the operations included in this cost model, broken down by their parameters.

  • Correct the data by subtracting the runtime of obtaining the cycle count.

  • Drop the 5% top and bottom samples from each cycle count dataset, and compute the average of the remaining samples.

  • For each operation, fit a least‐squares linear function approximation through the samples.

  • Rescale all machine expressions to make their total time match, as we only care about relative cost of each operation.

  • Take the per‐operation average of operation expressions across all machines, to construct expressions for an average machine.

  • Approximate the result with integer coefficients. Each cost unit corresponds to somewhere between 0.5 ns and 2.5 ns, depending on the hardware.

Member Functions

Name

Description

ActivateBegin

Marks the start of activating a dependency.

ActivateEnd

Accounts for the cost of activating a dependency.

DeactivateBegin

Marks the start of deactivating a dependency.

DeactivateEnd

Accounts for the cost of deactivating a dependency.

GetCost

Returns the accumulated cost.

GetLinearizationBegin

Marks the start of extracting the linearization.

GetLinearizationEnd

Marks the end of extracting the linearization (cost already charged in InitializeEnd).

InitializeBegin

Marks the start of the initialization phase.

InitializeEnd

Accounts for the cost of initialization and of the final linearization.

MakeTopologicalBegin

Marks the start of making the linearization topological.

MakeTopologicalEnd

Accounts for the cost of making the linearization topological.

MergeChunksBegin

Marks the start of merging chunks.

MergeChunksEnd

Accounts for the per‐step cost of merging chunks.

MergeChunksMid

Accounts for the per‐transaction cost of merging chunks.

MinimizeStepBegin

Marks the start of a single minimization step.

MinimizeStepEnd

Accounts for the cost of finishing a minimization step.

MinimizeStepMid

Accounts for the per‐transaction cost of a minimization step.

PickChunkToOptimizeBegin

Marks the start of picking a chunk to optimize.

PickChunkToOptimizeEnd

Accounts for the cost of picking a chunk to optimize.

PickDependencyToSplitBegin

Marks the start of picking a dependency to split.

PickDependencyToSplitEnd

Accounts for the cost of picking a dependency to split.

PickMergeCandidateBegin

Marks the start of picking a merge candidate.

PickMergeCandidateEnd

Accounts for the cost of picking a merge candidate.

StartMinimizingBegin

Marks the start of a minimization pass.

StartMinimizingEnd

Accounts for the cost of starting a minimization pass.

StartOptimizingBegin

Marks the start of setting up an optimization round.

StartOptimizingEnd

Accounts for the cost of setting up an optimization round.

Created with MrDocs