#18979: avoid Maxima on creation of symbolic matrices
-------------------------------------+-------------------------------------
       Reporter:  rws                |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.9
      Component:  linear algebra     |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Ralf Stephan       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/rws/avoid_maxima_on_creation_of_symbolic_matrices|  
75e679c687019c9657188003306bbd08314919a5
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Description changed by rws:

Old description:

> People have no idea what they ask for when they write `if ex != 0:` with
> `ex` possibly(!) a symbolic expression. E.g. this happens to trigger in
> `matrix/*` the full blown procedure of starting Maxima with its limited
> deductive armament trying to prove that `ex` is nonzero. This when all
> was wanted was that it not be a "numeric" zero.
>
> This ticket replaces the two instances in `matrix/` where such behaviour
> was triggered in doctests. Speedups are expected.

New description:

 People have no idea what they ask for when they write `if ex != 0:` with
 `ex` possibly(!) a symbolic expression. E.g. this happens to trigger in
 `matrix/*` the full blown procedure of starting Maxima with its limited
 deductive armament trying to prove that `ex` is nonzero. This when all was
 wanted was that it not be a "numeric" zero.

 This ticket replaces the two instances in `matrix/` where such behaviour
 was triggered in doctests.

 Compare on fresh Sage:
 Before:
 {{{
 sage: %timeit M = matrix(SR, 2, 2, x^2 - 2*x + 1)
 The slowest run took 468.13 times longer than the fastest. This could mean
 that an intermediate result is being cached
 1 loops, best of 3: 2.08 ms per loop
 }}}
 After:
 {{{
 sage: %timeit M = matrix(SR, 2, 2, x^2 - 2*x + 1)
 The slowest run took 815.87 times longer than the fastest. This could mean
 that an intermediate result is being cached
 10000 loops, best of 3: 82.8 µs per loop
 }}}

--

--
Ticket URL: <http://trac.sagemath.org/ticket/18979#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to