Mind theGap

14 RDF engines walk into a bar chart

Veronika Heimsbakk

MIND THE GAPMIND THE GAPMIND THE GAPMIND THE GAPMIND THE GAPMIND THE GAPMIND THE GAPMIND THE GAP
:benchmarks :chews :you :14 engines :10M triples
now with 100% more SPARQLes
Origin story

Not a benchmark.

A benchtrainmark.

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! ✦
Player 1

Who's driving this train?

Veronika Heimsbakk
Veronika Heimsbakk
Grey tabby kitten on a shoulder
office supervisor
QR code: veronahe.no
veronahe.no

“I build semantic systems that turn messy data into something both humans and machines can reason with.”

ClassOntologist & Knowledge Graph Specialist
XP10+ years of knowledge graphs: public sector, maritime, energy, automotive
OriginMathematical logic, University of Oslo
InventorySHACL for the Practitioner coverSHACL for the Practitioner (2025)
Knowledge Graph Engineering for Data Practitioners (Manning, 2027)
Top 50 Women in Tech, 2024
Guest lecturer, UiO
Side questshiking · trap shooting · fjords · festivals · drawing in TikZ
Save pointSubstack: From Data Engineering to Knowledge Engineering
1UP
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 ✓
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
Meet the contestants

14 engines. 5 languages. 0 mercy.

In-memory libraries

Disk-backed & servers

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
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.

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
*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
Server engines include HTTP upload time.
Finding 2 of 4

Let's run Q2. On all of them.Rocket to snail: ~1,700×

q2_customer_orders.rq
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
bench@10M — zsh
$ ▍

Q2 "big spender" at 10M · cold (first run, no warm-up) · log scale · shorter is better

Neo4j runs a Cypher translation of the query. Server engines include ~0.5–1 ms HTTP overhead.
POW!
cold start:
no cache, no mercy
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.
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
Finding 4 of 4

Can it even?

enginesurvives 10MQ6 boss level
q6 · the boss levelUPDATE
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.

Live demo

Dear wifi gods…

click to pause / play
  1. Flip scale: 100K → 10M
  2. Toggle log scale
  3. Toggle cold / warm
  4. Filter: in-memory vs servers
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.

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! ✦
← → navigate · R run · S sparkle · N notes · F fullscreen
SPEAKER NOTES