|
From: tomasriker <tom...@us...> - 2026-06-04 09:39:19
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Maxima CAS".
The branch, master has been updated
via 1eed9421451526999df0e72682ba30d3add12ac4 (commit)
from 43a9362220b09efe83ce48d7a959b2ab0fe8b368 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1eed9421451526999df0e72682ba30d3add12ac4
Author: David Scherfgen <d.s...@go...>
Date: Thu Jun 4 11:33:37 2026 +0200
Optimize SIMPARGS for lists (MLIST) and equations (MEQUAL)
Previously, when SIMPARGS processed a list (MLIST) or equation (MEQUAL), it
would call SIMPLIFYA on each element without making use of the "arguments
already simplified" flag (Y).
With this patch, lists and equations with arguments already simplified are
passed directly to EQTEST, while those with unsimplified arguments have their
arguments processed by SIMPLIFY.
For non-lists and non-equations, the original behavior of feeding the arguments
through SIMPCHECK (via SIMPMAP) remains identical.
diff --git a/src/simp.lisp b/src/simp.lisp
index 6cff86841..08355c9bf 100644
--- a/src/simp.lisp
+++ b/src/simp.lisp
@@ -384,12 +384,19 @@
(twoargcheck x))
(if (and (member 'array (cdar x)) (null (margs x)))
(merror (intl:gettext "SIMPARGS: subscripted variable found with no subscripts.")))
- (eqtest (let ((flag (member (caar x) '(mlist mequal))))
- (cons (ncons (caar x))
- (mapcar #'(lambda (u)
- (if flag (simplifya u y)
- (simpcheck u y)))
- (cdr x))))
+ (eqtest (if (member (caar x) '(mlist mequal))
+ ;; MLIST or MEQUAL: Arguments will not be converted from special
+ ;; representations to the general form.
+ (if y
+ ;; Arguments are already simplified - nothing to do here.
+ x
+ ;; Arguments are not simplified. Strip any flags from the header,
+ ;; and simplify arguments.
+ (cons (ncons (caar x)) (mapcar #'simplify (cdr x))))
+ ;; Not MLIST or MEQUAL. Strip any flags from the header, and call
+ ;; SIMPMAP, which will convert special representations to general
+ ;; form and simplify, if necessary (depending on flag Y).
+ (cons (ncons (caar x)) (simpmap (cdr x) y)))
x))
;;;-----------------------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
src/simp.lisp | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
hooks/post-receive
--
Maxima CAS
|