Skip to content
LIBRARY

SpecializationLevel ​

Cases ​

  • Despecialize

    • Stores parameters in a container with a stable outer type, so solver code compiled for one model can be reused for another. Lowest compilation latency, and the default.
  • AutoSpecialize

    • Reuses precompiled solver code where the solver installs a matching callable wrapper, and falls back to full specialization elsewhere.
  • FullSpecialize

    • Fully specializes on the model function and parameter types. Highest compilation latency, best runtime. Runtime benchmarking must use this level, because the other two add dispatch overhead by design.

Source ​

dyad
enum SpecializationLevel =
  | "Stores parameters in a container with a stable outer type, so solver code compiled for one model can be reused for another. Lowest compilation latency, and the default." Despecialize
  | "Reuses precompiled solver code where the solver installs a matching callable wrapper, and falls back to full specialization elsewhere." AutoSpecialize
  | "Fully specializes on the model function and parameter types. Highest compilation latency, best runtime. Runtime benchmarking must use this level, because the other two add dispatch overhead by design." FullSpecialize
  • Examples

  • Experiments

  • Analyses

  • Tests