snap-stanford / snap

Stanford Network Analysis Platform (SNAP) is a general purpose network analysis and graph mining library.
Other
2.16k stars 797 forks source link

Loading a smaller, denser graph is slower than a large sparser graph #155

Open selectasterisk opened 5 years ago

selectasterisk commented 5 years ago

I am trying to run the node2vec example on two bipartite graphs (with same node2vec configurations):

Graph A: 18M nodes 30M edges

Graph B: 7M nodes 13M edges

However, loading graph A is a lot faster than graph B (~8x), and a lot less memory intensive ( 17 TB vs 124 TB ) [memory data for ProbTransitionMatrix from PredictMemoryRequirements in biasedrandomwalk.cpp]

What is happening under the hood and how can I improve the performance?