Mind the Gap
14 RDF engines walk into a bar chart
Veronika Heimsbakk
:benchmarks
:chews
:you
:14
engines
:10M
triples
now with 100% more SPARQLes
Open with energy. "Raise your hand if you've ever picked an RDF library because it was the first one on Stack Overflow." Press S for extra sparkles.
Origin story
Not a benchmark.
A bench train mark.
2.5 hours on the train from Brumunddal to Drammen, home from a client. Built in train-sized sessions, with Claude as my pair programmer.
“How fast is maplib, really ?”
Mjøsa
Brumunddal
Hamar
Oslo
Lier
Drammen
no WiFi zone → offline mode
home! ✦
About 2.5 hours on the train between Brumunddal and Drammen, back home from a new client: farmland, along Mjøsa, past Hamar, down to the Drammen valley. A lot of dead time. At some point I stopped scrolling and wondered: how fast is maplib, really? Not "it's Rust so it must be fast", but actual numbers against actual alternatives. It came together over a few train rides with Claude as pair programmer. The GraphDB import polling, Neo4j running out of memory clearing 10M nodes, dotNetRDF writing to a read-only mount: bugs that eat an evening alone were 15-minute detours on the train. And between Oslo and Lier there's no WiFi, so that stretch was offline debugging. Hence: trainmarks.
Player 1
Who's driving this train?
Veronika Heimsbakk
office supervisor
veronahe.no
“I build semantic systems that turn messy data into something both humans and machines can reason with.”
Class Ontologist & Knowledge Graph Specialist
XP 10+ years of knowledge graphs: public sector, maritime, energy, automotive
Origin Mathematical logic, University of Oslo
Inventory SHACL for the Practitioner (2025)Knowledge Graph Engineering for Data Practitioners (Manning, 2027) Top 50 Women in Tech, 2024 Guest lecturer, UiO
Side quests hiking · trap shooting · fjords · festivals · drawing in TikZ
Save point Substack: From Data Engineering to Knowledge Engineering
1UP
Quick intro, 30 seconds max. Ontologist with a background in mathematical logic; a decade-plus of knowledge graphs. Wrote SHACL for the Practitioner. The cat is the office supervisor and approves of the benchmark.
Confession time
I work on maplib .
So you should be suspicious. Here's my deal with you:
open
Repo & scripts Run every number yourself. On your machine.
seed 42
Same data for all Same files, same queries, same timeouts.
it loses
And I'll show you maplib is not the fastest at everything. Stay tuned.
conflict of interest: declared ✓
Say the disclosure plainly and early. The three cards are the reason the audience should keep listening.
The actual question
"I have RDF in files. Now what?"
Load.ttl / .nt
→
QuerySELECT · CONSTRUCT
→
UpdateDELETE / INSERT
→
Write back.ttl / .nt
…and how much RAM did all that eat?
most benchmarks only time this bit ↓
breaking news
“it's quite terrible to have everybody have a bunch of the world's limited supply of DRAM”
— Sam Altman, October 2026
Sorry, Sam. 14 engines · 1 laptop · 36 GB of privately owned RAM
BSBM, LUBM, WatDiv: mostly query throughput on an endpoint. A data engineer's day is the whole loop. Then the RAM joke: Sam Altman said in late October 2026 (Cheeky Pint interview) that it's "quite terrible" for everybody to have a bunch of the world's limited supply of DRAM, and that you want maximum utilisation in the cloud. Well. This whole benchmark ran on one laptop's privately hoarded 36 GB.
Meet the contestants
14 engines. 5 languages. 0 mercy.
Don't read the cards. Point out the spread: pure Python, Rust cores behind Python, JVM, C/C++ servers in Docker, one C#.
The arena
A totally fake web shop
:placedBy
:contains
:country
:Order
:Customer
:Product
:Norway
Snack · 100K triples 3.6 MB Turtle
Meal · 1M triples 37 MB Turtle
All-you-can-eat buffet · 10M 369 MB Turtle · 1.1 GB N-Triples
random.seed(42) — the answer to reproducibility
Customers, products, orders. Orders are the bulk of the triples. Fixed seed so anyone regenerates identical files.
Six challenges
The obstacle course
Q1 · Count ALL the things COUNT every triple. Full scan.
Q2 · Who's the big spender? GROUP BY + SUM + ORDER BY, top 20.
Q3 · Three's company Customer + order + product join, country filter.
Q4 · OPTIONAL feelings Revenue by country & segment, OPTIONAL orders.
Q5 · Norwegians only, please CONSTRUCT a subgraph via joins.
Q6 · Boss level DELETE/INSERT, BIND + nested IF, five branches.
Q2 is the one we'll keep coming back to. Q6 is where engines start dropping out.
House rules
How we keep it fair-ish
warm
Best of 3, after a warm-up run
cold
First run. No cache. No JIT. No mercy.
I/O
One shot. Allocations are part of real life.
10 min
Per step. Then the gong. Timeouts count as results.
the track
Apple M3 Max · 36 GB RAM · macOS
Python & JVM engines run natively · servers run in Docker · GraphDB free tier, 1 CPU core
same machine same files same queries
Keep this quick. The cold/warm split will matter in finding 3.
*drumroll*
Results!
four findings · all at 10M triples · one of them hurts
Finding 1 of 4
Loading eats your lunch
Read 10M triples of N-Triples · seconds · shorter is better
queries: milliseconds loading: go make coffee
4 s to 2½ minutes for the same file. Most queries finish in milliseconds, so for batch pipelines the load is the bill.
Finding 2 of 4
Let's run Q2. On all of them. Rocket to snail: ~1,700×
q2_customer_orders.rq ▶ RUN
PREFIX : <http://benchmark.example/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?customer_name
(COUNT (?order ) AS ?order_count )
(SUM (?amount ) AS ?total_spend )
WHERE {
?order :placedBy ?customer ;
:totalAmount ?amount .
?customer rdfs:label ?customer_name .
}
GROUP BY ?customer_name
ORDER BY DESC (?total_spend )
LIMIT 20
Q2 "big spender" at 10M · cold (first run, no warm-up) · log scale · shorter is better
POW!
cold start: no cache, no mercy
↻ replay
Click RUN (or press R). The terminal "race" replays the real warm Q2 timings, compressed on a log clock: fast engines finish in a burst, rdflib makes everyone wait. Then POW, the chart, cold numbers: first run, nothing cached. Log scale! Each gridline is 10×.
Bonus round · Q5
CONSTRUCT: Norwegians only, please
SELECT gives you a table.CONSTRUCT gives you a graph back.
:placedBy
:contains
rdfs:label
:country
:totalAmount
rdfs:label
?order
?customer
?product
:Norway
?name
?amount
?productName
Q5 at 10M · warm · log scale · shorter is better
QLever: a SELECT monster. CONSTRUCT? ~100× slower.
The pattern on the left is the CONSTRUCT template: every Norwegian customer, their orders and the products in them, rebuilt as a new graph. Same joins as Q3, but now the engine has to materialise triples. QLever, which answered Q1–Q4 in single-digit milliseconds, needs ~330 ms here. Neo4j has no CONSTRUCT in Cypher.
Finding 3 of 4
Scaling reshuffles the ranking
Total query time across all queries, per engine, as the data grows · warm · log–log · lower is better
━ grows slower than the data ━ grows as fast, or faster ┅ linear (100× data = 100× time)
Small print, big deal Each line sums the queries that engine finished at every size: Q1–6 for most, Q1–5 for QLever, rudof, Virtuoso & Tentris, Q1–4 for Neo4j.
Compare slopes, not heights.
at 100K everyone looks like a hero
Whole query suite, three sizes. Dashed yellow = linear: lines parallel to it scale with the data. Watch the crossings: maplib (disk) starts among the slowest at 100K and ends near the top at 10M. Hover a line to highlight it. If you benchmark on a small sample, you will pick the wrong engine.
Finding 4 of 4
Can it even?
engine survives 10M Q6 boss level
q6 · the boss level UPDATE
DELETE { ?p :unitPrice ?old }
INSERT { ?p :unitPrice ?new }
WHERE { ?p a :Product ; :category ?cat …
BIND (IF (?cat = "Software", ?old * 1.10,
IF (?cat = "Hardware", ?old * 0.95,
IF (… 5 branches deep …)))
AS ?new ) }
Reprice every product by category: find, compute, delete the old price, insert the new one.
Support is a result too A fast engine that can't run your query is not fast.
Memory: apples, oranges, kiwis Python RSS vs JVM heap vs Docker container. Compare only within a family.
dotNetRDF runs out of memory at 10M (16 GB container). Read-only engines can't do Q6 by design — that's fine, if you know it before you choose.
Live demo
Dear wifi gods…
Flip scale: 100K → 10M
Toggle log scale
Toggle cold / warm
Filter: in-memory vs servers
60–90 seconds max. Showing the scale flip makes finding 3 visible. Drop this slide first if time is short.
So… which one?
Ask your workload, not me
Load-heavy or query-heavy? Batch pipelines pay mostly for loading.
Read-only or updates? Check the support grid before the speed chart.
In-process or server? Library in your Python/JVM, or a SPARQL endpoint?
How big will it get? Test at the size you'll have, not the size you have.
The honest answer is "it depends" — but now they know what it depends on.
Your turn
Run it on your data.
github.com/DataTreehouse/trainmarks
PRs welcome: new engines, new queries, new ways to embarrass my own library.
thank you! ✦