Dear Michael,

On Dec 17, 9:08 pm, mabshoff <michael.absh...@mathematik.uni-
dortmund.de> wrote:
> The 0.07 seconds is the CPU time we spend on the Sage side to
> communicate with Maxima, the rest is probably starting Maxima,
> communicating and then the solve on Maxima's side also. As you well
> know there is this general slowdown effect when one communicates with
> Maxima from Sage's end, so unless this is a clean session this could
> play a role here.

I am not convinced.

I find that first (and very quickly) the result of the time command
(the 0.07 s) is shown, and *after that* one has to wait, and finally
the solution appears. I think that Robert's example
> sage: print soln # fast
> sage: str(soln) # fast
> sage: repr(soln) # fast
> sage: soln # slow !?
indicates where this comes from.

More explicit, compare with the following variant:
sage: ct = cputime()
sage: time sln=solve([x^2+y^2 == 1, y^2 == x^3 + x + 1], x, y,
solution_dict=True)
CPU times: user 0.06 s, sys: 0.02 s, total: 0.08 s
Wall time: 0.17 s
# indeed fast
sage: time sln
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
Wall time: 0.00 s
# then: Wait for a long time! And finally comes:
[{y: -sqrt(3 - sqrt(3)*I)/sqrt(2), x: (-sqrt(3)*I - 1)/2},
 {y: sqrt(3 - sqrt(3)*I)/sqrt(2), x: (-sqrt(3)*I - 1)/2},
 {y: -sqrt(sqrt(3)*I + 3)/sqrt(2), x: (sqrt(3)*I - 1)/2},
 {y: sqrt(sqrt(3)*I + 3)/sqrt(2), x: (sqrt(3)*I - 1)/2},
 {y: -1, x: 0},
 {y: 1, x: 0}]
sage: cputime(ct)
2.4201510000000006

Cheers,
  Simon

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to