Rayforce — Columnar Analytics and Graph Traversal in One Pipeline - Rayforce
Tutorials
Rayfall Language
Namespaces
Data & Types
Queries
Storage & IPC
Graph Engine
Guides
Architecture
C API
Reference
PURE C17 · ZERO DEPS · GRAPH + ANALYTICS
Columnar analytics and<br>graph traversal in one pipeline
Rayforce is a zero-dependency embeddable engine where columnar analytics and graph operations share a single operation DAG, pass through a multi-pass optimizer, and execute as fused morsel-driven bytecode. Pure C17. No malloc.
Get Started
View on GitHub
Python
py.rayforcedb.com
$ pip install rayforce
import rayforce as rf
t = rf.read_csv("trades.csv")<br>out = (t.where(rf.col("price") > 100)<br>.group_by("symbol")<br>.agg(rf.col("qty").sum()))
Python docs →<br>PyPI
16K<br>Lines of C
External Dependencies
Optimizer Passes
THE PROBLEM<br>Analytics and graphs shouldn't need separate tools
THE RAYFORCE WAY
Single pipeline for analytics + graph
One optimizer understands both
Fused execution — no serialization overhead
Zero dependencies — embed in any C project
TODAY'S APPROACH
Separate tools for analytics and graphs
Two query languages, two data models
Serialize between tools on every step
Heavy Python dependencies for simple ops
MULTI-PASS OPTIMIZER
Type inference, constant folding, sideways information passing, factorize, predicate pushdown, filter reorder, fusion, and DCE — all in one pass over the DAG before a single element is touched.
MORSEL EXECUTION
1024-element morsel-driven bytecode. Element-wise ops fuse into single-pass pipelines. Thread-local arenas keep allocation off the critical path.
CSR GRAPH ENGINE
Double-indexed compressed sparse rows. Forward + reverse indices, mmap-friendly persistence, and algorithms from BFS to worst-case optimal joins.
WHAT YOU GET<br>Six pillars, one engine
Everything you need for columnar analytics, graph traversal, and an interactive query language in a single embeddable library.
Fused Execution
Morsel-driven bytecode over 1024-element chunks. Element-wise ops fused into single-pass pipelines that stay L1-resident.
Graph Engine
Double-indexed CSR storage. BFS, Dijkstra, A*, PageRank, Louvain, LFTJ — all in the same DAG.
Rayfall Language
Lisp-like query REPL with rich builtins. Lambdas compile lazily to bytecode. select/update bridge to the DAG optimizer.
Multi-Pass Optimizer
Type inference → constant folding → SIP → factorize → predicate pushdown → filter reorder → fusion → DCE.
Custom Allocator
Buddy allocator with slab cache. Thread-local arenas, lock-free allocation, COW ref counting. No malloc.
Zero Dependencies
Pure C17, single public header. Builds with make. ~16K lines of engine code. Embeds into any C/C++ project.
ARCHITECTURE<br>Build, optimize, execute
Data flows from lazy DAG construction through a multi-pass optimizer into fused morsel-driven bytecode execution.
CSV / Tables
CSR Graphs
Rayfall<br>SOURCES
RAYFORCE ENGINE
scan
filter
group
join
optimizer
fusion
bytecode<br>EXECUTION
morsel 1024
graph ops
LFTJ
DataFrames
Paths
Aggregates<br>RESULTS
Lazy DAG nodes → multi-pass optimizer (type inference, SIP, factorize, predicate pushdown, fusion, DCE) → fused morsel-driven executor with register-slot bytecode. Graph algorithms run in the same pipeline — no serialization between analytics and traversal.
SEE IT IN ACTION<br>From zero to query in seconds
Start the REPL, build tables, aggregate, and pivot — all in one session.
terminal
Start building in<br>30 seconds
$ make && ./rayforce<br>‣ (pivot t 'Symbol 'Side 'Qty sum)
Get Started
View on GitHub
Back to top