Training and SQL export benchmarks

duckboost 0.1.0 on DuckDB 2.0.1 LTS

Four trainer revisions ran on the same Apple M2 with 24 GiB of RAM, using the stock DuckDB 2.0.1 CLI. Each configuration ran three times in fresh processes. The table cells show median training seconds and peak process memory in MiB. Lower values are better for RMSE and log loss.

The standard workload uses 200,000 rows with four categorical and eight numeric features. The wide regression workload uses 50,000 rows with 32 numeric features. Each wide feature has approximately 48% zeros, 48% ones and a long tail. The target depends on whether each of the first three features is positive. All fits use seed 7, an untouched 20% hash holdout, 80 trees, depth 5 and at most 64 numeric cutpoints.

Standard regression

Trainer Holdout RMSE 1 thread (s / MiB) 4 threads (s / MiB) 8 threads (s / MiB)
v0.0.5 trainer on 2.0.1 0.238832 5.319 / 154.2 5.273 / 152.5 5.508 / 152.3
Empirical cutpoints 0.240560 5.656 / 159.5 5.370 / 152.9 5.544 / 152.6
Packed bins and subtraction 0.240560 3.844 / 150.4 3.763 / 146.8 3.811 / 146.7
0.1.0 trainer with scheduler 0.240560 3.946 / 149.3 3.106 / 147.2 2.831 / 147.5

Standard binary classification

Trainer Holdout Log loss 1 thread (s / MiB) 4 threads (s / MiB) 8 threads (s / MiB)
v0.0.5 trainer on 2.0.1 0.048162 3.774 / 153.3 3.973 / 152.6 4.059 / 155.5
Empirical cutpoints 0.048164 4.002 / 153.1 3.964 / 151.4 3.988 / 153.7
Packed bins and subtraction 0.048164 2.910 / 149.2 3.105 / 145.1 2.951 / 145.7
0.1.0 trainer with scheduler 0.048164 2.990 / 148.4 2.418 / 145.8 2.190 / 147.7

Wide skewed regression

Trainer Holdout RMSE 1 thread (s / MiB) 4 threads (s / MiB) 8 threads (s / MiB)
v0.0.5 trainer on 2.0.1 1.831095 1.577 / 102.9 1.566 / 111.7 1.571 / 112.3
Empirical cutpoints 0.142511 1.327 / 102.2 1.319 / 113.4 1.319 / 113.5
Packed bins and subtraction 0.142511 0.685 / 97.4 0.652 / 108.9 0.653 / 110.8
0.1.0 trainer with scheduler 0.142511 0.660 / 97.4 0.512 / 110.1 0.396 / 109.3

The timer includes the SQL aggregate, canonical row ordering, binning, tree construction and model serialization. It excludes dataset preparation and holdout evaluation. Memory is the highest process RSS across the three repeats and includes those other phases. The engine, compiler flags, revision IDs, per-fit times and peak memory measurements, and training options are recorded in the release benchmark data.

The empirical cutpoints reduced wide holdout RMSE from 1.831095 to 0.142511. Standard regression RMSE rose from 0.238832 to 0.240560 and binary log loss rose from 0.048162 to 0.048164. The storage and scheduler revisions preserved the cutpoint revision’s holdout scores to six decimals.

At eight threads, standard regression training dropped from 5.508 to 2.831 seconds, binary training from 4.059 to 2.190 seconds and wide training from 1.571 to 0.396 seconds. The release used less peak process memory than the baseline on all three workloads at that budget. At one thread, the packed-only revision ran slightly faster than the final revision on standard regression and classification. The tables show the differences across budgets.

Reproduce the release workloads

make release
python3 scripts/native_benchmark/run.py --n-rows 200000 --seed 7 --skip-lightgbm \
  --threads 4 --repeats 3 --output standard.json
python3 scripts/native_benchmark/run.py --wide --n-rows 50000 --seed 7 --skip-lightgbm \
  --threads 4 --repeats 3 --output wide.json

Use --threads 1 and --threads 8 to reproduce the other budgets. To compare extension builds on one engine, pass --cli and --extension with the paths to a matching stock CLI and loadable extension. Benchmark harness

Historical comparison with linked LightGBM

The October 2026 benchmark used the standard 200,000-row problem and one holdout fit per backend and task on Linux x86-64. The following results come from that earlier build. Original measurements

Task Backend Metric Holdout Accuracy Training seconds
regression native rmse 0.238832 10.650
regression lightgbm rmse 0.244557 16.337
binary native logloss 0.048162 0.9937 8.343
binary lightgbm logloss 0.057630 0.9921 20.416

For worked SQL examples on real CSVs, see the native trainer vignette.

SQL export size and execution

On the same Apple M2, each fixed ensemble scored 100,000 rows in a stock DuckDB 2.0.1 CLI with one thread. The table reports the median of three fresh processes. PREPARE includes parsing, binding, optimization and physical planning. EXECUTE computes the sum of predictions to force every row to be scored. All four before/after checksums matched. The baseline is the v0.0.5 implementation built for 2.0.1. Reproduce the export benchmark

Ensemble Separate trees SQL bytes, before → after Leaf literals, before → after Prepare (ms) Execute (ms)
1 × depth 8 false 292,757 → 19,843 6,561 → 256 254 → 21 188 → 29
1 × depth 8 true 292,880 → 19,966 6,561 → 256 229 → 19 165 → 27
8 × depth 5 false 85,850 → 19,218 1,944 → 256 84 → 24 79 → 42
8 × depth 5 true 86,295 → 19,663 1,944 → 256 65 → 19 63 → 38