If you want to try it out you have to use 

> sparse-polys branch from #1840 pull request. Here is a sample code: 
>
> In [1]: from sympy.polys.benchmarks.bench_solvers import * 
>
> In [2]: %time eqs = eqs_165x165() 
> CPU times: user 2.12 s, sys: 0.01 s, total: 2.13 s 
> Wall time: 2.12 s 
>
> In [3]: %time sol = solve_lin_sys(eqs, R_165) 
> CPU times: user 1.60 s, sys: 0.01 s, total: 1.60 s 
> Wall time: 1.59 s 
>
> > 
> > 
>


Hi, I just tried the  benchmark  file from the latest git pull but was not 
able to achieve  such good performance .    I don't have GMP installed so 
using whatever that sympy uses by default.  My test below shows solving 
these equations takes 32 secs, which  is 27 times longer than generating 
them 1.2 s.   This contrasts with your stats above which indicates solving 
these equations takes 1.6 s, which is even faster than generating them in 
2.12s  (is it  even possible ??). 

Your solve_lin_sy() function is indeed much faster  than the default 
solve(), taking over 600 s.  However when I've tried size 248x248 and 
Sage's solve() still solves under two min but your solve_lin_sys() takes 
over 20 mins,  at which point I just gave up and kill the process.  (If you 
need these data let me know)


All the tests below were done on my MacBook in 2011, 2.3 Ghz i3 with 8 GB 
Ram . Perhaps I should install GMP and try again ?  

In [1]: import bench_solvers

In [2]: %time _ = bench_solvers.time_eqs_165x165()
CPU times: user 1.18 s, sys: 0.09 s, total: 1.27 s
Wall time: 1.21 s

In [3]: %time _ = bench_solvers.time_to_expr_eqs_165x165()
CPU times: user 6.10 s, sys: 0.12 s, total: 6.22 s
Wall time: 6.16 s

In [4]: %time _ = bench_solvers.time_verify_sol_165x165()
CPU times: user 8.07 s, sys: 0.05 s, total: 8.12 s
Wall time: 8.10 s

In [5]: %time _ = bench_solvers.time_solve_lin_sys_165x165()
CPU times: user 32.52 s, sys: 0.11 s, total: 32.63 s
Wall time: 32.62 s  


In [7]: eqs = bench_solvers.eqs_165x165()

In [8]: eqs_ = [eqt.as_expr() for eqt in eqs]

In [11]: from sympy import solve

In [9]: %time _ = solve(eqs_,as_dict=True)   #default solve()   
CPU times: user 610.49 s, sys: 2.05 s, total: 612.54 s
Wall time: 614.68 s

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to