✦✧
✦CalcKernel 0.15.2 · WebAssembly performance and correctness update CK

THE CALCKERNEL LANGUAGE

Numerical kernels.
Compiled for native speed.

CalcKernel (CK) is a statically typed language for focused numerical workloads. It compiles CK programs to native machine code, with C and WebAssembly outputs for integration into existing systems.

Native code · Static types · C / WebAssembly
Explore language features↓
THE CK LANGUAGE

Numerical work, with clear boundaries.

CK is designed for small, compute-heavy routines embedded in larger applications. Its type system, defined numeric rules, and explicit data interfaces help developers reason about what a kernel reads, changes, and returns.

A NUMERICAL KERNEL

Make the data path explicit.

This kernel scales each value in a caller-provided f64 slice by a factor. The typed input and in-place update make the data boundary clear; the compiler only applies transformations when their correctness conditions and the target allow them.

Explore the language
scale.ckCK
export fn scale(
  values: slice<f64>,
  factor: f64
) -> void {
  let i: u32 = 0;
  while i < values.len {
    values[i] = values[i] * factor;
    i = i + 1;
  }
}
in-place kernelslice<f64> · while · export fn
PERFORMANCE

Compare performance, workload by workload.

Choose a workload to see the original comparison alongside new WASM measurements.

Performance comparisons

Reduction / Sum

1,048,576 u32 values · sequential sum modulo 2³²

Five implementations · v0.15.1

CK Native

0.036 ms7.1x

Rust

0.036 ms7.1x

C++

0.036 ms7.1x

Java

0.231 ms1.1x

JavaScript (Node.js)

0.252 ms1.0x
Reduction / Sum · Reduction / Sum
LanguageMedian per callSpeedup vs JavaScript
CK Native0.0357 ms7.1x
Rust0.0356 ms7.1x
C++0.0356 ms7.1x
Java0.2312 ms1.1x
JavaScript (Node.js)0.2518 ms1.0x

Same-target WASM

Clang WASM

0.123 ms1.0x

CK WASM

0.124 ms0.99x

Rust WASM

0.124 ms0.99x
Strict WebAssembly · SIMD128 · Reduction / Sum
LanguageMedian per callThroughput vs faster Clang/Rust reference
Clang WASM0.1233 ms1.0x
CK WASM0.1241 ms0.99x
Rust WASM0.1242 ms0.99x

v0.15.1: JavaScript = 1.0x · strict WASM: faster compatible same-profile Clang/Rust = 1.0x · Apple M5 Max · compressed bar scale. Times and ratios across reports are not directly comparable. Strict timings were not measured with the official v0.15.2 binary. CK WASM includes Node.js call time; setup and input copy are excluded.

Learn more
WHERE CK FITS

Keep the computational core focused.

CK is designed for numerical kernels embedded in a larger system: data transforms, repeated scoring or simulation, and other compute-heavy routines. Keep the data contract at the boundary and let the host application handle orchestration, storage, and user-facing features.

CK focuses on computation kernels. The host application owns memory and handles I/O, networking, and presentation around them.

WEBASSEMBLY IN v0.15.2

Faster kernels, with strict numeric behavior.

v0.15.2 improves eligible WebAssembly kernels while preserving strict floating-point behavior, safety proofs, and the caller-owned-memory ABI.

01

Bulk memory in baseline

The baseline Wasm profile permits bulk-memory operations for array copies and fills.

02

SIMD when selected

At O3 with simd128 enabled, eligible contiguous maps and reductions can use vector instructions; other loops keep scalar code.

03

A visible compatibility contract

Schema 2 records the selected Wasm profile and its digest so hosts can check compatibility.

04

Host-owned memory

The existing caller-owned-memory ABI stays the same, so the host continues to own and pass the data.

Explore the v0.15.2 release
THREE PRACTICAL QUESTIONS

Where does CK fit in your stack?

Keep your application in the tools you know. Use CK where a focused numerical kernel has a clear job and a clear boundary.

01 / 03

Why not just use Rust or C++?

Use them when they already fit your project. CK is a narrower language for numerical kernels: one source can become a Native library, C source, or WebAssembly module for an existing host. That focused boundary is the advantage; measure your workload before choosing on speed.

See the measurements
02 / 03

When is CK worth using?

Look for a repeated calculation that profiling shows is costly, with numeric inputs and a boundary you can describe clearly. It is most useful when that kernel must also be shared across applications or targets.

Explore output options
03 / 03

How does it join an existing project?

Export a CK function, build a module, then call it through a host interface. Node.js can load WebAssembly; Python and Rust can call a Native library through its generated C ABI. The host still owns data and memory.

Node.jsWebAssembly
Pythonctypes · C ABI
RustFFI · C ABI
Read the integration guide
BUILD WITH CALCKERNEL

Start with the language. Measure your workload.

Read the language overview, run a first kernel, then compare results using the same inputs and target machine.

Writing CK in VS Code? Get highlighting, live diagnostics, completion, and navigation. Explore the extension

↵ open · esc close