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.5.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
graphlay6 of 5550 of 5521 of 5553 of 5516 of 5516 of 55
graphlay fast47 of 5533 of 5519 of 5553 of 5515 of 5514 of 55
dagre0 of 5522 of 5536 of 5530 of 5521 of 5511 of 55
elk0 of 5528 of 556 of 5553 of 5515 of 5528 of 55
enginetotal time (ms)total crossingstotal bendstotal edges through nodestotal edge length (px)total area (kpx²)
graphlay19669300749202,559,963285,866
graphlay fast6749677762002,596,037326,949
dagre624912689551422963,647,109503,209
elk265512126847603,918,776519,560

Case by case​

casenodesedgesenginetime (ms)crossingsbendsedges through nodesedge length (px)area (kpx²)
bundled-lane-off-outline37graphlay0.50201,31555
bundled-lane-off-outline37graphlay fast0.40201,31555
bundled-lane-off-outline37dagre2.20801,15955
bundled-lane-off-outline37elk9.502001,46849
edge-label-gap-reservation33graphlay0.404046441
edge-label-gap-reservation33graphlay fast0.304046441
edge-label-gap-reservation33dagre0.904040042
edge-label-gap-reservation33elk5.604043330
dfg-small-example-all56graphlay0.4060828123
dfg-small-example-all56graphlay fast0.3060828123
dfg-small-example-all56dagre1.8050770151
dfg-small-example-all56elk8.4060804119
dfg-small-example-all-diag56graphlay0.3030659123
dfg-small-example-all-diag56graphlay fast0.3030659123
dfg-small-example-all-diag56dagre1.3050770151
dfg-small-example-all-diag56elk6.4060804119
dfg-small-example-min5pct56graphlay0.3060828123
dfg-small-example-min5pct56graphlay fast0.3060828123
dfg-small-example-min5pct56dagre1.3050770151
dfg-small-example-min5pct56elk7.1060804119
dfg-small-example-top25pct55graphlay0.3060644128
dfg-small-example-top25pct55graphlay fast0.3060644128
dfg-small-example-top25pct55dagre0.9050763152
dfg-small-example-top25pct55elk5.4060818131
dfg-an1-all818graphlay1.003004,878349
dfg-an1-all818graphlay fast1.103004,878349
dfg-an1-all818dagre5.952403,718318
dfg-an1-all818elk1333403,538216
dfg-an1-all-diag818graphlay1.101504,032349
dfg-an1-all-diag818graphlay fast1.101504,032349
dfg-an1-all-diag818dagre5.952403,718318
dfg-an1-all-diag818elk1233403,538216
dfg-an1-min5pct818graphlay0.903004,878349
dfg-an1-min5pct818graphlay fast0.903004,878349
dfg-an1-min5pct818dagre5.152403,718318
dfg-an1-min5pct818elk1133403,538216
dfg-an1-top25pct86graphlay0.2020520212
dfg-an1-top25pct86graphlay fast0.2020520212
dfg-an1-top25pct86dagre1.2020443222
dfg-an1-top25pct86elk5.4020518260
parallel-selfloops829graphlay0.401601,662107
parallel-selfloops829graphlay fast0.301601,662107
parallel-selfloops829dagre3.702202,717169
parallel-selfloops829elk7.501601,433103
multihop-run-through-rank98graphlay0.3060975201
multihop-run-through-rank98graphlay fast0.3060975201
multihop-run-through-rank98dagre1.9160832198
multihop-run-through-rank98elk5.60801,162234
chain-10109graphlay0.3000486121
chain-10109graphlay fast0.3000486121
chain-10109dagre1.7000486121
chain-10109elk5.4000486121
chain-10-lr109graphlay0.300048688
chain-10-lr109graphlay fast0.200048688
chain-10-lr109dagre1.700048688
chain-10-lr109elk5.000048688
dfg-repairexample-all1028graphlay3.045107,560569
dfg-repairexample-all1028graphlay fast1.755408,604575
dfg-repairexample-all1028dagre7.7204007,824548
dfg-repairexample-all1028elk1265405,034342
dfg-repairexample-all-diag1028graphlay3.142806,488569
dfg-repairexample-all-diag1028graphlay fast1.772907,084575
dfg-repairexample-all-diag1028dagre8.0204007,824548
dfg-repairexample-all-diag1028elk1465405,034342
dfg-repairexample-min5pct1026graphlay2.044006,308521
dfg-repairexample-min5pct1026graphlay fast1.144006,308521
dfg-repairexample-min5pct1026dagre6.5183207,087538
dfg-repairexample-min5pct1026elk1144404,934359
dfg-repairexample-top25pct1011graphlay0.401201,483302
dfg-repairexample-top25pct1011graphlay fast0.401201,483302
dfg-repairexample-top25pct1011dagre2.431011,979348
dfg-repairexample-top25pct1011elk6.601401,688279
pn-small-example-im1112graphlay0.40401,343187
pn-small-example-im1112graphlay fast0.40401,343187
pn-small-example-im1112dagre2.70901,548195
pn-small-example-im1112elk6.801202,117196
bk-infeasible-layer1211graphlay0.401201,886215
bk-infeasible-layer1211graphlay fast0.401201,886215
bk-infeasible-layer1211dagre2.10501,154257
bk-infeasible-layer1211elk6.101201,894296
pn-repairexample-alphappp125graphlay0.2020486289
pn-repairexample-alphappp125graphlay fast0.2020486289
pn-repairexample-alphappp125dagre1.2020446395
pn-repairexample-alphappp125elk5.5020351159
dfg-rtfm-all1378graphlay71121155062,7592,342
dfg-rtfm-all1378graphlay fast24133201073,3322,800
dfg-rtfm-all1378dagre37272123254,5641,804
dfg-rtfm-all1378elk48226226054,6681,389
dfg-rtfm-all-diag1378graphlay7412871054,8882,391
dfg-rtfm-all-diag1378graphlay fast2314086061,1242,778
dfg-rtfm-all-diag1378dagre37272123254,5641,804
dfg-rtfm-all-diag1378elk51226226054,6681,389
dfg-rtfm-min5pct1314graphlay0.501605,6131,278
dfg-rtfm-min5pct1314graphlay fast0.501605,6131,278
dfg-rtfm-min5pct1314dagre3.501005,0161,113
dfg-rtfm-min5pct1314elk6.501806,6701,198
dfg-rtfm-top25pct1326graphlay2.003007,064852
dfg-rtfm-top25pct1326graphlay fast1.512806,522902
dfg-rtfm-top25pct1326dagre7.443507,6841,009
dfg-rtfm-top25pct1326elk1314607,193864
pn-bpic12-tsinghua1628graphlay3.863707,783673
pn-bpic12-tsinghua1628graphlay fast2.163707,783673
pn-bpic12-tsinghua1628dagre8.7113327,454668
pn-bpic12-tsinghua1628elk12175206,705556
diamond-blocks1724graphlay0.503204,560407
diamond-blocks1724graphlay fast0.503204,560407
diamond-blocks1724dagre3.601602,644407
diamond-blocks1724elk6.803204,016774
typegraph-ocel2-p2p1734graphlay8.51516013,9711,277
typegraph-ocel2-p2p1734graphlay fast1.91718013,9661,307
typegraph-ocel2-p2p1734dagre9.45548119,4521,282
typegraph-ocel2-p2p1734elk201560016,0761,397
typegraph-order-management1746graphlay177640029,9651,492
typegraph-order-management1746graphlay fast3.09940029,0031,490
typegraph-order-management1746dagre1314267427,8971,412
typegraph-order-management1746elk2288116039,8291,322
dfg-sepsis-all18135graphlay2575323660164,6885,331
dfg-sepsis-all18135graphlay fast555703720167,7325,568
dfg-sepsis-all18135dagre818092272132,0403,247
dfg-sepsis-all18135elk1316523900146,7013,618
dfg-sepsis-all-diag18135graphlay2635841570142,2155,272
dfg-sepsis-all-diag18135graphlay fast496481540144,4915,523
dfg-sepsis-all-diag18135dagre718092272132,0403,247
dfg-sepsis-all-diag18135elk1256523900146,7013,618
dfg-sepsis-min5pct1850graphlay212096026,8372,430
dfg-sepsis-min5pct1850graphlay fast9.92094027,5662,228
dfg-sepsis-min5pct1850dagre206973026,3191,939
dfg-sepsis-min5pct1850elk3221110023,8592,079
dfg-sepsis-top25pct1849graphlay221992026,2232,372
dfg-sepsis-top25pct1849graphlay fast7.21992026,3272,199
dfg-sepsis-top25pct1849dagre196272025,3921,932
dfg-sepsis-top25pct1849elk3227114028,5031,929
dag-202030graphlay3.454405,976759
dag-202030graphlay fast1.154405,976759
dag-202030dagre7.073327,307835
dag-202030elk1354006,247600
typegraph-container-logistics2134graphlay5.22815015,9691,477
typegraph-container-logistics2134graphlay fast2.13117014,0831,436
typegraph-container-logistics2134dagre8.97341117,9401,464
typegraph-container-logistics2134elk152366017,6591,299
wide-shallow-303130graphlay0.8056046,1601,766
wide-shallow-303130graphlay fast0.8056046,1601,766
wide-shallow-303130dagre4.7030036,454780
wide-shallow-303130elk9.7058079,5261,993
grid-6x636180graphlay151095380094,3441,541
grid-6x636180graphlay fast111095380094,3441,541
grid-6x636180dagre39923152162197,8072,514
grid-6x636180elk4211353800123,5544,492
hub-spoke-404140graphlay2.4038034,5131,521
hub-spoke-404140graphlay fast2.5038034,5131,521
hub-spoke-404140dagre9.0040030,5211,378
hub-spoke-404140elk12076048,2902,185
pn-rtfm-imf02-reference4252graphlay1.702609,1501,485
pn-rtfm-imf02-reference4252graphlay fast1.602609,1501,485
pn-rtfm-imf02-reference4252dagre1103908,2901,614
pn-rtfm-imf02-reference4252elk1304409,4811,229
pn-sepsis-discovered4571graphlay133689021,8093,110
pn-sepsis-discovered4571graphlay fast4.73689021,8093,110
pn-sepsis-discovered4571dagre184863719,1213,008
pn-sepsis-discovered4571elk2857100020,0082,392
pn-repairexample-im4858graphlay1.802809,3142,072
pn-repairexample-im4858graphlay fast2.002809,3142,072
pn-repairexample-im4858dagre16038010,0562,396
pn-repairexample-im4858elk27558013,2932,162
dag-505075graphlay101892017,6631,937
dag-505075graphlay fast3.322112021,7212,283
dag-505075dagre194378924,0172,826
dag-505075elk2934102028,7862,735
dag-50-lr5075graphlay1118112019,0862,143
dag-50-lr5075graphlay fast3.222105020,6642,423
dag-50-lr5075dagre2140761321,5272,791
dag-50-lr5075elk2934102023,3582,573
pn-pn5524graphlay0.70902,4441,101
pn-pn5524graphlay fast0.70902,4441,101
pn-pn5524dagre5.201012,2744,132
pn-pn5524elk1301201,845997
pn-bpic19-alphappp6271graphlay102767015,9353,071
pn-bpic19-alphappp6271graphlay fast4.82867015,2312,899
pn-bpic19-alphappp6271dagre2154581016,0842,945
pn-bpic19-alphappp6271elk293476015,1962,869
pn-rtfm-imf6494graphlay181290030,8964,132
pn-rtfm-imf6494graphlay fast7.51290030,8964,132
pn-rtfm-imf6494dagre301883132,6024,820
pn-rtfm-imf6494elk359108030,8794,145
pn-sepsis-fodina6482graphlay222185027,7544,651
pn-sepsis-fodina6482graphlay fast6.42984028,2634,510
pn-sepsis-fodina6482dagre263966829,6366,323
pn-sepsis-fodina6482elk352186027,7823,866
pn-sepsis-imf6482graphlay3.2053018,7333,239
pn-sepsis-imf6482graphlay fast3.2053018,7333,239
pn-sepsis-imf6482dagre23056020,4163,605
pn-sepsis-imf6482elk28080020,5663,536
dag-100100150graphlay2422174031,0134,624
dag-100100150graphlay fast6.122190030,9044,593
dag-100100150dagre45761532456,0127,514
dag-100100150elk5635198038,9356,252
dag-200200300graphlay52634590100,33415,490
dag-200200300graphlay fast1585452087,54711,672
dag-200200300dagrefailedfailedfailedfailedfailedfailed
dag-200200300elk1031263980111,78317,935
layered-wide-200x8200600graphlay390577311700808,45223,468
layered-wide-200x8200600graphlay fast157586811940810,99521,119
layered-wide-200x8200600dagre46570615751554948,8758,452
layered-wide-200x8200600elk2337052107201,519,14579,800
cycles-300300500graphlay1331898060198,56835,782
cycles-300300500graphlay fast491998090199,10634,034
cycles-300300500dagre33136753369305,04274,951
cycles-300300500elk2253637440226,74254,659
dag-400400600graphlay1421699480222,09235,062
dag-400400600graphlay fast491829300219,66434,187
dag-400400600dagre631390589117339,31870,277
dag-400400600elk2183187980258,92558,360
dag-100010001500graphlay40437418270335,321121,785
dag-100010001500graphlay fast16945718500344,204166,553
dag-100010001500dagre41419681475302980,129275,435
dag-100010001500elk895105121280832,087259,290
dag-200020003000graphlay105875337020705,252246,101
dag-200020003000graphlay fast56089437120699,875218,023
dag-200020003000dagrefailedfailedfailedfailedfailedfailed
dag-200020003000elk18061994418001,908,5201,256,460