Skip to main content

Benchmarks

The corpus is every plain fixture of the test suite: process models discovered from public event logs and synthetic graphs, from a few nodes to two thousand. graphlay, dagre and ELK (layered, orthogonal routing) each lay out every case with the same node sizes and the same node and layer gaps. graphlay uses the options the fixture names, which for a directly-follows graph is the process-map preset. graphlay's own metrics measure all three results.

Lower is better everywhere. Time is the median of several runs in Node, graphlay as WebAssembly, the others as JavaScript. Area is the bounding box of nodes and edges. "graphlay fast" is the same engine with effort: "fast", the setting for an interactive relayout.

dagre's edge points are control points for a smooth curve. Counted as a polyline they bend less and cut through more nodes than the drawn curve would. On a directly-follows graph, graphlay uses edge weights to keep the main path straight, which costs it bends and saves crossings. dagre and ELK do not read weights that way.

Versions: graphlay 0.2.0, @dagrejs/dagre 3.1.1, elkjs 0.12.0. Regenerate with pnpm --filter bench bench.

Over the whole corpus​

How many cases each engine wins, with a tie counting for every engine that shares it, and the totals.

enginetime (ms) winscrossings winsbends winsedges through nodes winsedge length (px) winsarea (kpx²) wins
graphlay7 of 5549 of 5519 of 5553 of 5517 of 5516 of 55
graphlay fast46 of 5533 of 5518 of 5552 of 5515 of 5515 of 55
dagre0 of 5522 of 5537 of 5530 of 5521 of 5512 of 55
elk0 of 5528 of 556 of 5553 of 5513 of 5527 of 55
enginetotal time (ms)total crossingstotal bendstotal edges through nodestotal edge length (px)total area (kpx²)
graphlay28579301752302,494,153265,669
graphlay fast9169692768642,524,043299,693
dagre1083112689551422963,647,109503,209
elk418212126847603,918,776519,560

Case by case​

casenodesedgesenginetime (ms)crossingsbendsedges through nodesedge length (px)area (kpx²)
bundled-lane-off-outline37graphlay1.00201,31555
bundled-lane-off-outline37graphlay fast0.80201,31555
bundled-lane-off-outline37dagre3.10801,15955
bundled-lane-off-outline37elk1302001,46849
edge-label-gap-reservation33graphlay0.704046441
edge-label-gap-reservation33graphlay fast0.704046441
edge-label-gap-reservation33dagre2.004040042
edge-label-gap-reservation33elk9.204043330
dfg-small-example-all56graphlay0.8060828123
dfg-small-example-all56graphlay fast0.7060828123
dfg-small-example-all56dagre2.6050770151
dfg-small-example-all56elk11060804119
dfg-small-example-all-diag56graphlay0.7030659123
dfg-small-example-all-diag56graphlay fast0.6030659123
dfg-small-example-all-diag56dagre2.3050770151
dfg-small-example-all-diag56elk11060804119
dfg-small-example-min5pct56graphlay0.7060828123
dfg-small-example-min5pct56graphlay fast0.6060828123
dfg-small-example-min5pct56dagre2.7050770151
dfg-small-example-min5pct56elk11060804119
dfg-small-example-top25pct55graphlay0.4060644128
dfg-small-example-top25pct55graphlay fast0.4060644128
dfg-small-example-top25pct55dagre1.5050763152
dfg-small-example-top25pct55elk8.2060818131
dfg-an1-all818graphlay1.903004,878349
dfg-an1-all818graphlay fast1.903004,878349
dfg-an1-all818dagre9.852403,718318
dfg-an1-all818elk2233403,538216
dfg-an1-all-diag818graphlay1.501504,032349
dfg-an1-all-diag818graphlay fast1.401504,032349
dfg-an1-all-diag818dagre8.952403,718318
dfg-an1-all-diag818elk1833403,538216
dfg-an1-min5pct818graphlay1.403004,878349
dfg-an1-min5pct818graphlay fast1.403004,878349
dfg-an1-min5pct818dagre9.152403,718318
dfg-an1-min5pct818elk3033403,538216
dfg-an1-top25pct86graphlay0.6020520212
dfg-an1-top25pct86graphlay fast0.6020520212
dfg-an1-top25pct86dagre2.7020443222
dfg-an1-top25pct86elk8.3020518260
parallel-selfloops829graphlay1.101601,662107
parallel-selfloops829graphlay fast1.201601,662107
parallel-selfloops829dagre1002202,717169
parallel-selfloops829elk1401601,433103
multihop-run-through-rank98graphlay0.6060975201
multihop-run-through-rank98graphlay fast0.5060975201
multihop-run-through-rank98dagre3.3160832198
multihop-run-through-rank98elk100801,162234
chain-10109graphlay0.4000486121
chain-10109graphlay fast0.3000486121
chain-10109dagre2.7000486121
chain-10109elk8.4000486121
chain-10-lr109graphlay0.400048688
chain-10-lr109graphlay fast0.400048688
chain-10-lr109dagre2.600048688
chain-10-lr109elk7.300048688
dfg-repairexample-all1028graphlay4.145107,210553
dfg-repairexample-all1028graphlay fast2.655408,254559
dfg-repairexample-all1028dagre19204007,824548
dfg-repairexample-all1028elk2865405,034342
dfg-repairexample-all-diag1028graphlay6.342906,163553
dfg-repairexample-all-diag1028graphlay fast2.972706,755559
dfg-repairexample-all-diag1028dagre23204007,824548
dfg-repairexample-all-diag1028elk2765405,034342
dfg-repairexample-min5pct1026graphlay2.444006,042504
dfg-repairexample-min5pct1026graphlay fast1.344006,042504
dfg-repairexample-min5pct1026dagre7.1183207,087538
dfg-repairexample-min5pct1026elk1644404,934359
dfg-repairexample-top25pct1011graphlay0.601201,483302
dfg-repairexample-top25pct1011graphlay fast0.401201,483302
dfg-repairexample-top25pct1011dagre3.231011,979348
dfg-repairexample-top25pct1011elk1101401,688279
pn-small-example-im1112graphlay0.80701,769195
pn-small-example-im1112graphlay fast0.50701,769195
pn-small-example-im1112dagre4.40901,548195
pn-small-example-im1112elk1101202,117196
bk-infeasible-layer1211graphlay1.101201,886215
bk-infeasible-layer1211graphlay fast1.301201,886215
bk-infeasible-layer1211dagre6.60501,154257
bk-infeasible-layer1211elk1101201,894296
pn-repairexample-alphappp125graphlay0.4020486289
pn-repairexample-alphappp125graphlay fast0.3020486289
pn-repairexample-alphappp125dagre3.1020446395
pn-repairexample-alphappp125elk9.7020351159
dfg-rtfm-all1378graphlay113120159058,9802,166
dfg-rtfm-all1378graphlay fast36132208069,4132,593
dfg-rtfm-all1378dagre74272123254,5641,804
dfg-rtfm-all1378elk113226226054,6681,389
dfg-rtfm-all-diag1378graphlay7212975051,6262,220
dfg-rtfm-all-diag1378graphlay fast3314086058,1252,593
dfg-rtfm-all-diag1378dagre61272123254,5641,804
dfg-rtfm-all-diag1378elk81226226054,6681,389
dfg-rtfm-min5pct1314graphlay0.901605,5711,269
dfg-rtfm-min5pct1314graphlay fast0.701605,5711,269
dfg-rtfm-min5pct1314dagre5.201005,0161,113
dfg-rtfm-min5pct1314elk9.701806,6701,198
dfg-rtfm-top25pct1326graphlay3.103006,896836
dfg-rtfm-top25pct1326graphlay fast2.212806,426892
dfg-rtfm-top25pct1326dagre1243507,6841,009
dfg-rtfm-top25pct1326elk2014607,193864
pn-bpic12-tsinghua1628graphlay4.863907,185605
pn-bpic12-tsinghua1628graphlay fast2.463907,185605
pn-bpic12-tsinghua1628dagre11113327,454668
pn-bpic12-tsinghua1628elk14175206,705556
diamond-blocks1724graphlay0.703204,560407
diamond-blocks1724graphlay fast0.703204,560407
diamond-blocks1724dagre9.101602,644407
diamond-blocks1724elk1203204,016774
typegraph-ocel2-p2p1734graphlay141516013,9711,277
typegraph-ocel2-p2p1734graphlay fast3.21718013,9661,307
typegraph-ocel2-p2p1734dagre155548119,4521,282
typegraph-ocel2-p2p1734elk281560016,0761,397
typegraph-order-management1746graphlay187540029,2501,445
typegraph-order-management1746graphlay fast3.411241429,3401,464
typegraph-order-management1746dagre1714267427,8971,412
typegraph-order-management1746elk2888116039,8291,322
dfg-sepsis-all18135graphlay3195323690156,8964,962
dfg-sepsis-all18135graphlay fast545703790160,2795,232
dfg-sepsis-all18135dagre1378092272132,0403,247
dfg-sepsis-all18135elk2046523900146,7013,618
dfg-sepsis-all-diag18135graphlay4115841580136,4034,962
dfg-sepsis-all-diag18135graphlay fast636531570138,7315,232
dfg-sepsis-all-diag18135dagre1198092272132,0403,247
dfg-sepsis-all-diag18135elk3266523900146,7013,618
dfg-sepsis-min5pct1850graphlay332098025,6372,340
dfg-sepsis-min5pct1850graphlay fast112096026,4572,184
dfg-sepsis-min5pct1850dagre346973026,3191,939
dfg-sepsis-min5pct1850elk3721110023,8592,079
dfg-sepsis-top25pct1849graphlay251994024,9392,281
dfg-sepsis-top25pct1849graphlay fast8.31994025,2832,162
dfg-sepsis-top25pct1849dagre306272025,3921,932
dfg-sepsis-top25pct1849elk4227114028,5031,929
dag-202030graphlay5.954405,700722
dag-202030graphlay fast2.054405,700722
dag-202030dagre1373327,307835
dag-202030elk2154006,247600
typegraph-container-logistics2134graphlay9.22815015,7321,454
typegraph-container-logistics2134graphlay fast3.73017013,8321,412
typegraph-container-logistics2134dagre137341117,9401,464
typegraph-container-logistics2134elk302366017,6591,299
wide-shallow-303130graphlay1.4056045,7401,697
wide-shallow-303130graphlay fast1.5056045,7401,697
wide-shallow-303130dagre8.5030036,454780
wide-shallow-303130elk17058079,5261,993
grid-6x636180graphlay301095380091,8241,474
grid-6x636180graphlay fast111095380091,8241,474
grid-6x636180dagre60923152162197,8072,514
grid-6x636180elk9211353800123,5544,492
hub-spoke-404140graphlay3.7038033,9531,437
hub-spoke-404140graphlay fast3.6038033,9531,437
hub-spoke-404140dagre21040030,5211,378
hub-spoke-404140elk24076048,2902,185
pn-rtfm-imf02-reference4252graphlay3.103109,1051,457
pn-rtfm-imf02-reference4252graphlay fast3.103109,1051,457
pn-rtfm-imf02-reference4252dagre2603908,2901,614
pn-rtfm-imf02-reference4252elk2004409,4811,229
pn-sepsis-discovered4571graphlay183784020,6462,761
pn-sepsis-discovered4571graphlay fast5.53790020,0942,795
pn-sepsis-discovered4571dagre264863719,1213,008
pn-sepsis-discovered4571elk4957100020,0082,392
pn-repairexample-im4858graphlay2.6030010,7291,994
pn-repairexample-im4858graphlay fast2.6030010,7291,994
pn-repairexample-im4858dagre21038010,0562,396
pn-repairexample-im4858elk34558013,2932,162
dag-505075graphlay1318100018,3142,066
dag-505075graphlay fast4.522112021,1892,176
dag-505075dagre294378924,0172,826
dag-505075elk4534102028,7862,735
dag-50-lr5075graphlay1918110018,0241,917
dag-50-lr5075graphlay fast5.922111020,2592,105
dag-50-lr5075dagre3940761321,5272,791
dag-50-lr5075elk4534102023,3582,573
pn-pn5524graphlay0.90702,4721,101
pn-pn5524graphlay fast0.90702,4721,101
pn-pn5524dagre7.601012,2744,132
pn-pn5524elk1801201,845997
pn-bpic19-alphappp6271graphlay9.72770014,1473,066
pn-bpic19-alphappp6271graphlay fast5.72872014,1132,865
pn-bpic19-alphappp6271dagre3354581016,0842,945
pn-bpic19-alphappp6271elk443476015,1962,869
pn-rtfm-imf6494graphlay241293030,2473,899
pn-rtfm-imf6494graphlay fast101293030,2473,899
pn-rtfm-imf6494dagre601883132,6024,820
pn-rtfm-imf6494elk409108030,8794,145
pn-sepsis-fodina6482graphlay362395026,9394,380
pn-sepsis-fodina6482graphlay fast5.12780026,6734,317
pn-sepsis-fodina6482dagre363966829,6366,323
pn-sepsis-fodina6482elk442186027,7823,866
pn-sepsis-imf6482graphlay4.5060019,2353,048
pn-sepsis-imf6482graphlay fast4.2060019,2353,048
pn-sepsis-imf6482dagre32056020,4163,605
pn-sepsis-imf6482elk41080020,5663,536
dag-100100150graphlay3722188030,2324,459
dag-100100150graphlay fast9.322196030,2434,451
dag-100100150dagre62761532456,0127,514
dag-100100150elk7135198038,9356,252
dag-200200300graphlay7563459096,41714,475
dag-200200300graphlay fast1684444087,27911,140
dag-200200300dagrefailedfailedfailedfailedfailedfailed
dag-200200300elk1531263980111,78317,935
layered-wide-200x8200600graphlay544577311800801,08322,237
layered-wide-200x8200600graphlay fast194586812020803,58221,541
layered-wide-200x8200600dagre78070615751554948,8758,452
layered-wide-200x8200600elk3167052107201,519,14579,800
cycles-300300500graphlay2041878020191,90333,462
cycles-300300500graphlay fast801948030193,00431,744
cycles-300300500dagre67336753369305,04274,951
cycles-300300500elk3823637440226,74254,659
dag-400400600graphlay2491709060216,93735,531
dag-400400600graphlay fast881879120211,16030,885
dag-400400600dagre1103390589117339,31870,277
dag-400400600elk3243187980258,92558,360
dag-100010001500graphlay59937418290321,590107,756
dag-100010001500graphlay fast23645718780326,228147,641
dag-100010001500dagre71349681475302980,129275,435
dag-100010001500elk1315105121280832,087259,290
dag-200020003000graphlay170775337460674,339256,335
dag-200020003000graphlay fast76189337430666,002238,744
dag-200020003000dagrefailedfailedfailedfailedfailedfailed
dag-200020003000elk29501994418001,908,5201,256,460