For the record, the relevant commits were:
commit 0f9dfa1251e569ecb9f2f4287ead78cbdd0ed298
Author: kortschak <
dan.ko...@adelaide.edu.au>
Date: Wed Sep 9 20:51:59 2015 +0930
topo: use use
golang.org/x/.../intsets for TarjanSCC
name old mean new mean delta
TarjanSCCGnp_10_tenth 20.3µs × (0.97,1.03) 20.0µs × (0.99,1.05) ~ (p=0.400 n=10+9)
TarjanSCCGnp_100_tenth 489µs × (0.98,1.01) 448µs × (0.99,1.01) -8.38% (p=0.000 n=8+9)
TarjanSCCGnp_1000_tenth 39.2ms × (0.99,1.02) 37.2ms × (1.00,1.00) -5.12% (p=0.000 n=8+9)
TarjanSCCGnp_10_half 28.9µs × (1.00,1.00) 26.7µs × (1.00,1.01) -7.67% (p=0.000 n=9+10)
TarjanSCCGnp_100_half 1.90ms × (0.99,1.01) 1.72ms × (0.97,1.02) -9.49% (p=0.000 n=10+10)
TarjanSCCGnp_1000_half 177ms × (1.00,1.01) 169ms × (0.96,1.06) -4.68% (p=0.001 n=10+10)
commit cf7ce3ae79fc6ddb4241d7a3a8e325f5b28d6748
Author: kortschak <
dan.ko...@adelaide.edu.au>
Date: Wed Sep 9 11:35:46 2015 +0930
traverse: use
golang.org/x/.../intsets
This gives a significant performance improvements:
WalkAllBreadthFirstGnp_10_tenth 6.79µs ± 3% 4.76µs ± 2% -29.91% (p=0.000 n=10+9)
WalkAllBreadthFirstGnp_100_tenth 233µs ± 1% 172µs ± 1% -26.26% (p=0.000 n=9+8)
WalkAllBreadthFirstGnp_1000_tenth 19.5ms ± 1% 15.9ms ± 0% -18.69% (p=0.000 n=10+9)
WalkAllBreadthFirstGnp_10_half 14.8µs ± 2% 11.1µs ± 1% -24.90% (p=0.000 n=10+10)
WalkAllBreadthFirstGnp_100_half 866µs ± 2% 758µs ± 2% -12.44% (p=0.000 n=8+10)
WalkAllBreadthFirstGnp_1000_half 82.2ms ± 2% 73.0ms ± 1% -11.16% (p=0.000 n=10+10)
WalkAllDepthFirstGnp_10_tenth 6.84µs ± 1% 4.71µs ± 0% -31.12% (p=0.000 n=9+9)
WalkAllDepthFirstGnp_100_tenth 234µs ± 1% 177µs ± 5% -24.26% (p=0.000 n=9+10)
WalkAllDepthFirstGnp_1000_tenth 19.7ms ± 1% 16.0ms ± 1% -18.46% (p=0.000 n=10+10)
WalkAllDepthFirstGnp_10_half 14.7µs ± 1% 11.1µs ± 0% -24.28% (p=0.000 n=10+10)
WalkAllDepthFirstGnp_100_half 894µs ± 6% 764µs ± 3% -14.53% (p=0.000 n=10+10)
WalkAllDepthFirstGnp_1000_half 82.6ms ± 0% 73.5ms ± 1% -11.06% (p=0.000 n=10+10)
Using the non-pointer type for visited is clearer, but resulted in
an ~4-8% performance drop for some cases. So leaving as the pointer.
commit 0cb3ef48ea002db3ba72d0f7c9b237b991f95c7c
Author: kortschak <
dan.ko...@adelaide.edu.au>
Date: Sun Oct 4 15:57:46 2015 +1030
simple: clean up code and docs for simple graphs
commit cee7cd2ec964b689269d4a6ab33f8170cb0cb486
Author: kortschak <
dan.ko...@adelaide.edu.au>
Date: Fri Oct 30 18:30:48 2015 +1030
graph: return all neighbours reachable from u
The transformation of a digraph to an undirected graph means nodes
returned by To should be returned by From.
I think the remaining instances of use were included in new code after
the decision to use intsets.Sparse.