Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
jsNetworkX neighbors and things
(version: 1)
This is very incomplete
Comparing performance of:
neighbors one vs neighbors many vs neighbors None vs directed edge (one) vs directed weighted edge (one)
Created:
7 years ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<script src='https://cdn.rawgit.com/fkling/JSNetworkX/master/jsnetworkx.js'></script>
Script Preparation code:
const graph_size = 1000; var G = new jsnx.Graph(); for (let i=0; i<graph_size-1; i++) { G.addEdge(i, i+1); if (i % 10 == 0) { G.addEdge(i, 'tens'); } } G.addNode('none'); // directional graph http://jsnetworkx.org/api/#/v/v0.3.4/DiGraph var diG = new jsnx.DiGraph(); // G.addEdgesFrom([[3,4], [4,5]], {color: 'red'}); diG.addEdgesFrom([ [100, 201], [100, 202], [100, 203], [100, 204], [100, 205], [205, 301], // grand child [10, 100], // points from parent of 100 ]); console.log('children of 100: ', diG.successors(100)); // should return [ 201, 202, 203, 204, 205 ]
Tests:
neighbors one
G.neighbors(123);
neighbors many
G.neighbors('tens');
neighbors None
G.neighbors('none');
directed edge (one)
diG.addEdge([2, 3]);
directed weighted edge (one)
diG.addEdge([2, 3], {weight: 4.7});
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (5)
Previous results
Fork
Test case name
Result
neighbors one
neighbors many
neighbors None
directed edge (one)
directed weighted edge (one)
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
jsNetworkX big graph vs 2 smaller ones - lookup time --2
jsNetworkX multiple lookups vs GC
Function call vs bind vs bind and call vs function.call
push vs spread in building graph from edges
Comments
Confirm delete:
Do you really want to delete benchmark?