Sign in or sign up before continuing. Don't have an account yet? Register now to get started.
Register now

test_bic_algs of bic.py runs much slower (the calls from admcycles)

The comparison of the bic algorithm (using nothing) from bic.py and the algorithm using all StableGraphs runs much slower after merging origin/master.

Run at commit: 70636c88

sage: from admcycles.diffstrata import *
sage: %time test_bic_algs([(1,0,-1),(2,),(4,),(1,-1)])
(1, 0, -1): ([], [])
(2,): ([], [])
(4,): ([], [])
(1, -1): ([], [])
CPU times: user 358 ms, sys: 33.4 ms, total: 391 ms
Wall time: 574 ms
sage: %time test_bic_algs()
(1, 1): ([], [])
(1, 1, 0, 0, -2): ([], [])
(2, 0, -2): ([], [])
(1, 0, 0, 1): ([], [])
(1, -2, 2, 1): ([], [])
(2, 2): ([], [])
CPU times: user 1min 20s, sys: 1 s, total: 1min 21s
Wall time: 1min 21s

At the commit: 29e66c47

sage: from admcycles.diffstrata import *
sage: %time test_bic_algs([(1,0,-1),(2,),(4,),(1,-1)])
(1, 0, -1): ([], [])
(2,): ([], [])
(4,): ([], [])
(1, -1): ([], [])
CPU times: user 716 ms, sys: 32.6 ms, total: 748 ms
Wall time: 923 ms

The other one does not terminate in reasonable time.

More precisely: at commit: 70636c88

test_bic_alt runs the two different bic algorithms and compares the results. These are the times for the seperate function calls.

sage: %time L=bics(2,(1, -2, 2, 1))
CPU times: user 1min 4s, sys: 578 ms, total: 1min 5s
Wall time: 1min 5s
sage: %time R=bic_alt(Signature((1, -2, 2, 1)))
CPU times: user 268 ms, sys: 3.72 ms, total: 272 ms
Wall time: 272 ms
sage: %time comp_list(R,L)
CPU times: user 82.6 ms, sys: 1.82 ms, total: 84.4 ms
Wall time: 84.6 ms
([], [])

At commit 29e66c47 we have:

sage: from admcycles.diffstrata import *
sage: %time R=bic_alt(Signature((1, -2, 2, 1)))
CPU times: user 270 ms, sys: 6.6 ms, total: 277 ms
Wall time: 283 ms

%time L=bics(2,(1, -2, 2, 1)) does not finish in reasonable time.

Edited Dec 18, 2019 by Jonathan Zachhuber
Assignee Loading
Time tracking Loading