Hacker News

A new runtime for k and q: l

Comments

[ 01A ] compatible k4, q, qSQL. Unchanged. Run the syntax, idioms, and code you already ship. Tables, dicts, and time-series work unchanged.

  • k4 syntax compatibility
  • Native q and qSQL support
  • Optimized columnar tables
  • Zero code rewrites

A new runtime for the k family

l runs k4, q, and qSQL unchanged - on a new engine built for modern memory: compressed vectors, SIMD, and automatic parallelism. The q/k/qSQL you already have, just faster.

l> sum 1 2 3 4 5 6
21

Modern HPC runtime: 0.02 ms SIMD reduction ยท scalar syntax

What is l

k and q made the vector the unit of thought. l keeps that language and makes the compressed vector the unit of execution: primitives run directly on the encoded bytes, so the full array is never rebuilt. Modern hardware starves for bandwidth long before it runs short of compute - so moving fewer bytes is what makes it fast.

[ 01A ] compatible - run the syntax, idioms, and code you already ship. Tables, dicts, and time-series work unchanged.

[ 01B ] compressed data stays compressed at rest, in memory, and in transit. Primitives run directly on the compressed vectors, so less data moves.

[ 01C ] transparent - the runtime picks the execution path - scalar, SIMD, threaded, or offloaded - with no annotations. You write sum x; l does the rest.

Performance

3.57x TSBS, master-benchmark, and db-benchmark results link back to their source repositories, result files, and validation notes. See All Benchmarks:

  • 2.35x TSBS geomean vs reference
  • 3.57x master suite overall geomean
  • 3.16x DBB total query speedup
  • 3.08x DBB per-query geomean
Metric Value
load: l CSV read + partitioned store 73.5 s
load: DuckDB CSV into memory 27.1 s
total query time l 56.6 s vs DuckDB 178.8 s
total query speedup 3.16x
per-query geomean 3.08x
validation all 10 queries validated

In practice

The same qSQL you write in q. Columns stay compressed while the engine runs over them.

// 86.5M-row analytics table - single CPU
l> count AN_pageView
86585107

l> select sum isBot, count i, avg isBot by date.month from AN_pageView
month    isBot   cnt      botRate
2024.05  29404   1634214  0.01799275
2024.06  49596   1495228  0.03316952
2024.07  194442  2812446  0.06913626

Single CPU ยท no decode pass ยท 86.5M rows

The same primitives, faster

One expression runs as a SIMD reduction on small vectors and fans out across threads on large ones.

l> avg 1 2 3 4 5 6
3.5
// -> fsum (SIMD reduction) -> / count

l> avg 1 2 3 4 ... 999999
// worker0: sum x[0..hi0]
// worker1: sum x[hi0..hi1]
// worker2: sum x[hi1..hi2]
// ...
// sum = s0 + s1 + s2 + ...
// avg = sum / n
499999.5

l> remote
Linux:hopen `:10.0.0.1:8080
connected

SIMD reduction ยท thread fan-out ยท remote execution ยท one expression

Anonymous mail group

In the spirit of classic technical mailing lists: notes, benchmarks, design questions, release logs. No profiles, no directories. Join with email only.

Comments

No comments yet. Start the discussion.