npm run bench runs two suites: the RDF reasoning workloads, then the
Jelly codec comparison with rdfjs-jelly. --suite reasoning
or --suite jelly runs one of them, and --case or --adapter selects the
reasoning suite. The Jelly suite needs the inputs npm run sync keeps in
.cache/bench-jelly/; without them, npm run bench says so and skips it.
RDF reasoning
These workloads compare RDF reasoners on OWL 2 RL, SKOS, QUDT and SHACL, the
profiles eyemind adds with --owl2rl, --skos, --qudt and --shacl. They are
not specific to eyemind or to Logic Script (LS): any implementation that reads
Turtle and writes N-Triples or N-Quads can run them through a command adapter,
and the runner times it and compares its conclusions with a reference.
Workloads
node bench/workloads.js DIR writes each workload as DIR/ID/ontology.ttl
(the ontology or shapes graph) and DIR/ID/data.ttl, with DIR/manifest.json
listing their identifiers, profiles, descriptions and expected counts where
defined. The generator is
deterministic, so every implementation reasons over the same triples.
| Workload | Profiles | What it exercises |
|---|---|---|
owl-subclass-100x1, owl-subclass-100x100, owl-subclass-500x10 |
owl2rl | Transitive class hierarchies, with few or many instances. |
owl-property-chain-250, owl-property-chain-2500 |
owl2rl | owl:propertyChainAxiom over many paths. |
owl-family-200, owl-family-2000 |
owl2rl | Inverse, symmetric, transitive and sub-properties, domains, ranges, equivalent classes and owl:sameAs aliases. |
skos-tree-200, skos-tree-2000 |
skos | A concept scheme in a skos:broader tree. |
qudt-speeds-10, qudt-speeds-100, qudt-speeds-1000 |
qudt | Normalizing cdt:speed literals in four units. |
owl-qudt-speeds-10 |
owl2rl, qudt | The two profiles together. |
shacl-persons-100, shacl-persons-1000, shacl-persons-5000 |
shacl | SHACL Core validation, one person in ten invalid. |
Running
npm run bench # both suites, eyemind on every reasoning workload
npm run bench -- --suite reasoning # the reasoning workloads only
npm run bench -- --case skos-tree-200 --iterations 5
npm run bench -- --adapter eyemind="node bin/eyemind.js {flags} --to n-quads {ontology} {data}" \
--adapter other="other-reasoner --profiles {profiles} {ontology} {data} -o {output}" \
--reference eyemind --json /tmp/bench.json
An adapter is NAME=COMMAND, run by sh. The command may use {flags}
(--owl2rl and so on), {profiles} (owl2rl,qudt), {ontology}, {data}
and {output}. Without {output}, its standard output is its output, which
is N-Triples or N-Quads: the triples it concludes, with or without its input.
Without --adapter, the runner uses eyemind. Workloads are written to
.cache/bench/ unless --dir names another directory.
What is measured
Each measurement is the wall time of one adapter process, including its
start-up, parsing, reasoning and writing, and its peak resident memory where
GNU time is installed. After a first run, a workload is run --iterations
times (3 by default) and the median is reported; a first run longer than ten
seconds is the only run. A run that exceeds --timeout seconds (600 by
default) is reported as a timeout.
Start-up is measured separately: each adapter runs once per profile set on an empty ontology and empty data, which costs whatever starting the process and loading those profiles costs. The report gives each total with the time after start-up, the total less that baseline. For an implementation that loads its profiles once and then reasons over many inputs, the time after start-up is the cost that repeats.
Conclusions are compared with the reference adapter (the first, or
--reference). For OWL 2 RL, SKOS and QUDT, the runner compares domain
triples: new triples about a subject of the input, without blank nodes. It
leaves out statements about the RDF, RDFS, OWL and XSD vocabularies,
reflexive owl:sameAs, owl:equivalentClass, owl:equivalentProperty,
rdfs:subClassOf and rdfs:subPropertyOf axioms, and typing as
rdfs:Resource or owl:Thing; rule sets differ there by design. QUDT
results are compared only where the implementations share a result
vocabulary. The speed workloads expect one qconv:normalizedQuantity link
per measurement, and the SHACL workloads expect four sh:ValidationResult
nodes per invalid person. The runner reports a count mismatch as an error
instead of a timing. For SHACL, the comparison matches each focus node with
the constraint component it violates.
Run the benchmark under a memory cap on a small machine, as the full test
suite runs: systemd-run --user --scope -q -p MemoryMax=3G -p MemorySwapMax=0 -- npm run bench.
For eyemind alone, the reasoning workloads take a few minutes, most of it
for owl-subclass-500x10.
Sample results
npm run bench on an AMD Ryzen 5 7520U with Node.js 26.11.1: the median
wall time of each eyemind process, with the time after start-up.
| Workload | Profiles | eyemind |
|---|---|---|
| owl-subclass-100x1 | owl2rl | 1.0 s (698 ms after start-up) |
| owl-subclass-100x100 | owl2rl | 2.0 s (1.7 s after start-up) |
| owl-subclass-500x10 | owl2rl | 41.9 s (41.6 s after start-up) |
| owl-property-chain-250 | owl2rl | 699 ms (384 ms after start-up) |
| owl-property-chain-2500 | owl2rl | 2.7 s (2.4 s after start-up) |
| owl-family-200 | owl2rl | 612 ms (296 ms after start-up) |
| owl-family-2000 | owl2rl | 3.2 s (2.8 s after start-up) |
| skos-tree-200 | skos | 507 ms (324 ms after start-up) |
| skos-tree-2000 | skos | 2.9 s (2.7 s after start-up) |
| qudt-speeds-10 | qudt | 260 ms (67 ms after start-up) |
| qudt-speeds-100 | qudt | 537 ms (344 ms after start-up) |
| qudt-speeds-1000 | qudt | 1.8 s (1.6 s after start-up) |
| owl-qudt-speeds-10 | owl2rl, qudt | 663 ms (320 ms after start-up) |
| shacl-persons-100 | shacl | 457 ms (255 ms after start-up) |
| shacl-persons-1000 | shacl | 1.4 s (1.2 s after start-up) |
| shacl-persons-5000 | shacl | 5.1 s (4.9 s after start-up) |
Jelly codecs
bench/jelly.js compares eyemind’s Jelly-RDF reader and writer with Pieter
Colpaert’s rdfjs-jelly,
following the retained-array workload of its performance notes. npm run sync
fetches its inputs into .cache/bench-jelly/, recording their revisions and
SHA-256 digests in upstream.json: the latest rdfjs-jelly, built with
npm ci (which runs its build scripts), with its 10,000-message
OpenStreetMap fixture, and seven RiverBench
streams of 10,000 RDF Messages each, in the row layout of Jelly-RDF 1.0.
| Workload | Statements | What it exercises |
|---|---|---|
airports |
112,899 | One flat stream of triples: the OurAirports snapshot in examples/data/scheduled-airports-rq.ttl. |
osm-messages |
300,656 | rdfjs-jelly’s OpenStreetMap fixture (osm2rdf-denmark): long literals, blank nodes. |
assist-iot-weather |
1,150,000 | Many repeated terms, the largest stream. |
citypulse-traffic |
360,000 | A blank node in every message. |
digital-agenda-indicators |
82,424 | Small messages, many datatypes. |
linked-spending |
158,342 | Many non-ASCII literals and blank nodes. |
muziekweb |
51,721 | Long non-ASCII literals. |
nanopubs |
340,000 | Quads in named graphs, mostly unique IRIs. |
yago-annotated-facts |
45,960 | Triple terms as objects (RDF 1.2). |
npm run bench -- --suite jelly # every workload
node --expose-gc bench/jelly.js --case nanopubs --iterations 9
node --expose-gc bench/jelly.js --rdfjs ../rdfjs-jelly/dist/index.mjs --riverbench DIR
--rdfjs names another built rdfjs-jelly, --riverbench DIR other
fixtures (each DIR/NAME.jelly.gz is a workload), and --messages FILE
another OpenStreetMap fixture. Run it under a memory cap on a small machine:
assist-iot-weather keeps more than a million statements of each codec live.
Both writers write Jelly-RDF 1.2, declaring the lowest RDF version the data
needs, with a 1,024-statement batch budget and persistent lookup tables of
4,096 names, 256 prefixes and 32 datatypes. Each reader reads both writers’
exact bytes; for the RiverBench and OpenStreetMap workloads, both also read
the original row-layout fixture. rdfjs-jelly does not read RDF-star streams
of Jelly-RDF 1.0, so for yago-annotated-facts eyemind reads the fixture and
only the 1.2 codecs are compared. The runner verifies statements and message
boundaries in both directions, allowing blank-node relabeling within each
group.
Inputs are in memory. File I/O, gunzip, Turtle parsing, term conversion and
result comparison are outside the timing. Each codec reads and writes its
own term representation, and the read result stays live until the operation
ends. With --expose-gc, GC runs before each operation and GC during the
operation counts toward its time. Each codec has two warmups and five
measured runs (--warmups N, --iterations N), alternating which goes
first; the median is reported, and the run ends with the geometric mean of
each operation’s throughput ratio over the workloads.
Sample results
npm run bench on an AMD Ryzen 5 7520U with Node.js 26.11.1 and
rdfjs-jelly 0.3.0 (revision 016d049): median milliseconds, and eyemind’s
throughput relative to rdfjs-jelly. Differences of a few percent are within
the run-to-run noise of this machine.
| Workload | Write 1.2 | Read eyemind bytes | Read rdfjs-jelly bytes | Read row-layout fixture |
|---|---|---|---|---|
| airports | 141 / 168 (1.20×) | 56 / 54 (0.96×) | 52 / 54 (1.04×) | – |
| osm-messages | 353 / 449 (1.27×) | 141 / 155 (1.10×) | 135 / 154 (1.14×) | 145 / 224 (1.54×) |
| assist-iot-weather | 758 / 1042 (1.38×) | 273 / 347 (1.27×) | 309 / 354 (1.15×) | 437 / 715 (1.64×) |
| citypulse-traffic | 323 / 469 (1.45×) | 154 / 198 (1.28×) | 148 / 196 (1.32×) | 157 / 260 (1.65×) |
| digital-agenda-indicators | 91 / 102 (1.12×) | 37 / 49 (1.33×) | 40 / 51 (1.27×) | 47 / 71 (1.52×) |
| linked-spending | 186 / 192 (1.03×) | 87 / 95 (1.09×) | 79 / 91 (1.16×) | 84 / 140 (1.67×) |
| muziekweb | 108 / 115 (1.07×) | 39 / 52 (1.32×) | 42 / 54 (1.26×) | 48 / 74 (1.54×) |
| nanopubs | 458 / 474 (1.03×) | 150 / 164 (1.10×) | 154 / 169 (1.10×) | 171 / 273 (1.59×) |
| yago-annotated-facts | 139 / 147 (1.05×) | 56 / 113 (2.03×) | 51 / 109 (2.12×) | – |
| Geometric mean | 1.17× | 1.25× | 1.26× | 1.59× |
The written streams are within 0.6% of each other in size, except for
yago-annotated-facts, where eyemind’s is 2.3% smaller: 17.32 bytes per
statement each for airports, 24.47 for eyemind and 24.58 for rdfjs-jelly
for osm-messages, 9.03 and 9.04 for assist-iot-weather, and 26.37 and
26.36 for nanopubs.
eyemind decodes a column batch directly from the input bytes into reused arrays, shares the term of an IRI while its lookup entries stay the same, and decodes the row layout the same way. Its writer keeps each IRI’s prefix, name and last identifiers across batches, pins the identifiers a batch uses instead of undoing a statement that does not fit, replaces cold identifiers in order so that new entries travel as runs, and writes nested messages and UTF-8 text in place.
