Performance
SimpleGraphgrid construction (100×100): 6.3× faster (170 µs → 27 µs), now faster than petgraphCsrBuildergrid construction (100×100): 23% faster (115 µs → 89 µs)- BFS traversal: ~9% faster (improved cache locality)
connected_components: ~16% faster (43 µs → 36 µs)
Changed
SimpleGraphnow usesSmallVec<[u32; 8]>for per-vertex neighbor storage. Vertices with degree ≤ 8 store neighbors inline (no heap allocation), dramatically improving construction performance for sparse graphs.CsrBuildernow counts degrees incrementally duringadd_edgeand tracks sortedness, avoiding redundant passes inbuild().- New dependency:
smallvec(with optionalserdefeature gated behind theserdecargo feature).
Full Changelog: v0.1.0...v0.2.0