Learn

Contents

Examples

Four complete projects, each on a problem shaped like a real one and at a size where the design matters: tens or hundreds of millions of values over several dimensions. Get them from the Download page, signed in: one zip, elucid8-examples-<version>.zip, with a folder for each project (no data: each one generates its own). Each folder has:

To run one, you need the elucid8 command of this release, from the Download page. You also need Python 3 with NumPy, or pyarrow and DuckDB for the features, or pyarrow for the markets. Each README starts with a quick run that takes seconds:

python3 generate.py --ticks 60
python3 analyse.py

Point-in-time features for machine learning

Folder: examples/features/. Features and a churn label for 100,000 customers on every day of a year (36.5 million rows), computed from 2.2 million purchases.

Full size, on 18 threads: the table in 4.14 s (4.11 s written as records).

A spatio-temporal sensor field

Folder: examples/sensor-field/. A grid of 256 × 256 temperature sensors over 1,000 ticks (65.5 million readings, 1.1 GB of CSV), with missing readings, an offline patch, faulty sensors, spikes and warm fronts.

Full size, on 18 threads: the batch in 1.4 s, of which about 0.5 s is reading the 1.1 GB CSV. In the stream, a tick takes 2.2 ms to compute, and 10.5 ms from its readings being sent to its alerts in NumPy.

A physical simulation

Folder: examples/simulation/. Heat spreading across a 512 × 512 plate for 1,000 steps, with heaters and cooling bars. It shows demand-driven evaluation concretely:

Full size, on 18 threads: the probe at step 1,000 in 0.29 s, the whole plate at step 1,000 in 0.35 s and 70 MB.

Market feeds as of each moment

Folder: examples/markets/. A trading day of 4,001 symbols: 120 million quotes and 30 million trades, on separate feeds, each row with its own time. For every trade, the program gives:

Every answer carries a timestamp, the newest data it read, so its freshness comes with it. A variant with a planted leak (a window reaching one second past each trade) gives answers stamped after their trade, which one check over the timestamps finds. Two corrections to the quotes are sent to elucid8 serve.

Full size, on 18 threads: every trade's answers in 6.0 s, as one Parquet table that the Python script writes while elucid8 computes.

Against the tools you might use instead

Each example has a baseline/ folder. It holds the same computation, on the same generated data, written as a user of each tool would write it:

Each baseline is checked against eLucid8's answers. Its measure.py runs eLucid8 and the baseline at full size, one after the other, and records every time with the machine's load at that moment.

How eLucid8 runs in each comparison, and what is timed:

comparisoneLucid8what is timed
simulation: the plate, a probeelucid8 run, one processthe whole process: reading the CSV files, computing, writing the .npz file
sensor field: the batchelucid8 run, one process writing 40 .npz filesthe whole process, reading the 1.1 GB CSV included
sensor field: the streamelucid8 serve, a long-running process: each tick's readings are sent as new rows over HTTP, then the tick's alerts are asked for, as Arrowper tick, as a Python client sees it: sending the rows, the answer, and reading it into NumPy (the query alone is given too)
features: the tableelucid8 run, one process writing an Arrow file per column, or recordsinside the Python script, from its start to the Parquet file
features: a late correctionelucid8 serve: the corrected file is sent as a new version, then the columns are asked for againthe queries after the correction, and before it
markets: every trade's answerselucid8 run, one process writing records per chunk of symbolsinside the Python script, from its start to one Parquet table

The baselines are timed the same way, from reading the same files to the same result.

Exact sums, and sums in any order. eLucid8's sum and mean are exact: the exact value, rounded once, whatever the order of the elements. NumPy, DuckDB, Polars and pandas add in their own order instead. approx_sum and approx_mean let eLucid8 do the same, so each example was measured both ways:

Two comparisons, both measured, because the tools use threads differently:

exampleeLucid8, one threadeLucid8, 18 threadsbaselineone thread against one threadeach at its defaults
simulation: the whole plate at step 1,0001.78 s0.35 sNumPy 1.32 sNumPy 1.35× fastereLucid8 3.8× faster
simulation: one probe cell at step 1,0001.50 s0.29 sNumPy 1.32 s (the whole plate)NumPy 1.14× fastereLucid8 4.6× faster
simulation: one probe cell at step 1000.042 s0.017 sNumPy 0.27 s (the whole plate)eLucid8 6.4× fastereLucid8 16× faster
sensor field: the batch, 1,000 ticks7.19 s1.42 sNumPy 7.19 s on one thread, 4.46 s on 18 threadsleveleLucid8 3.1× faster
sensor field: the stream, one tick13.2 ms10.5 msNumPy 6.9 ms on one thread, 5.8 ms on 18 threadsNumPy 1.9× fasterNumPy 1.8× faster
features: the training table to Parquet8.46 s4.14 sDuckDB 21.6 s on one thread, 4.22 s on 18 threads; pandas 15.1 s on one thread, 14.5 s with pyarrow on 18 threadseLucid8 2.6× faster than DuckDB, 1.8× faster than pandaslevel with DuckDB; eLucid8 3.5× faster than pandas
features: the same table, written as records7.64 s4.11 sthe sameeLucid8 2.8× faster than DuckDB, 2.0× faster than pandaseLucid8 1.03× faster than DuckDB, 3.5× faster than pandas
markets: every trade's answers to Parquet39.2 s6.00 sDuckDB 78.4 s on one thread, 8.85 s on 18 threads; Polars 26.9 s, 10.0 seLucid8 2.0× faster than DuckDB; Polars 1.5× fastereLucid8 1.5× faster than DuckDB, 1.7× faster than Polars

pandas was not measured on the markets in this round: at this size it needs about 40 GB of memory. Its script is in the example's baseline/ folder.

With sums in any order (approx_sum, approx_mean):

What each line compares:

A late correction is not a race between the same computations, so it is not in the table.

In the markets, a correction to 0.1% of the quotes, chosen at random, touches 3,999 of the 4,001 symbols, so every tool recomputes nearly everything. A bad feed on 5 symbols for 10 minutes is where patching pays for the other tools, and where elucid8 serve, which recomputes only what a changed quote can change, answers again in 0.6 s: the Markets README gives both.

A small neural network against PyTorch. Not one of the four projects, but measured the same way: a network of 89 parameters (one hidden layer of 8 tanh units, on 9,212 samples of the Alps temperatures), trained with gradients written by hand, against the same network in PyTorch 2.14 on the CPU, in 64-bit floats. Per training step:

eLucid8, exact sumseLucid8, sums in any orderPyTorch (gradients by hand; autograd)
each at its defaults (eLucid8 18 threads, PyTorch 6)0.45 ms0.38 ms0.27 ms; 0.29 ms
one thread2.35 ms1.48 ms0.46 ms; 0.47 ms

PyTorch is 1.7× faster than eLucid8 with exact sums and 1.4× faster with sums in any order at the defaults, and 5.1× and 3.2× faster on one thread. eLucid8's loss equals an independent plain-loop computation of the same training bit for bit at 60, 200 and 1,000 steps; PyTorch's is within 6e-13 of it. With exact sums, the largest part of eLucid8's time on one thread is the exact small sums of products in each unit; with sums in any order, tanh and the gradients' long sums. eLucid8 has no GPU backend and no automatic differentiation yet.

Where eLucid8 is slower:

Measured with release 0.22.0 of elucid8, running each example's program as released with it (the simulation's whole plate, the stream and the corrections with release 0.24.0, on 6 November 2026), on an Apple M5 Max (18 cores, 64 GB), macOS 26.6.2. The other tools were measured on the same machine the day before, with Python 3.12, NumPy 2.5.3, DuckDB 1.5.6, Polars 2.0.0, pandas 3.0.6, pyarrow 26.0.0 and PyTorch 2.14.

Against the numbers published before (measured with elucid8 0.22.0, on the same machine and versions), the rows measured again with 0.24.0:

0.22.00.24.0
simulation: the whole plate at step 1,0000.36 s; 1.81 s on one thread0.35 s; 1.78 s on one threadfaster
sensor field: the stream's tick, answers as Arrow over HTTP12.5 ms; 14.8 ms on one thread10.5 ms; 13.2 ms on one threadfaster
sensor field: the stream's tick, answers as JSON over standard input16.6 ms; 18.6 ms on one thread14.0 ms; 16.7 ms on one threadfaster
sensor field: the stream's query3.4 ms; 5.7 ms on one thread2.2 ms; 4.8 ms on one threadfaster
markets: the service after a correction, 0.1% of the quotes at random; the bad feed7.3 s; 5.1 s3.0 s; 0.6 sfaster
features: the correction with a point cache, five columns after it0.25 s0.24 slevel
features: the same five columns before the correction0.79 s0.84 s6% slower
features: the correction with compiled loops, after it0.06 s0.04 sfaster

The other numbers on this page were measured with 0.24.0 too, and were within 5% of 0.23.0's or faster; they keep 0.22.0's figures.

To measure on your machine, in an example's folder after python3 generate.py, run python3 baseline/measure.py, with NumPy, or pyarrow, DuckDB, Polars and pandas installed. It takes a few minutes for each example, and about 80 minutes for the markets. Each README gives the details.