Re-writing a graph library's inbuilt functions to use matrices instead of their inbuilt graph data structure is literally giving me 10x performance boosts in nearly all of my calculations.....I'm not sure what be up, but something, indeed, be up.
Edit: Their implementation is actually WAY better, the problem is I need to do conversions into matrix forms which is insanely slow, which leads to a bottleneck which is beaten just by using the matrix implementation, apparently.