Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: maxima (sbcl) arithmetic is very slow
Date: Tue, 04 Jan 2022 22:16:51 +0100	[thread overview]
Message-ID: <20220104211651.UZIXMeNbo4X0XVoEjY0qhmy-JJwE9FeN99th0S1xe3o@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-34849@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1483 bytes --]

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/issues/34849#issuecomment-1005176605

Comment:
I had success with the following patch
```
--- a/src/init-cl.lisp	2021-05-15 20:20:53.000000000 -0300
+++ b/src/init-cl.lisp	2022-01-04 17:45:03.838273626 -0300
@@ -574,8 +574,13 @@
 			 (delete-file file)))))
 	   *temp-files-list*))
 
+#+sbcl
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (require 'sb-gmp))
+
 (defun cl-user::run ()
   "Run Maxima in its own package."
+  #+sbcl (sb-gmp:install-gmp-funs)
   (in-package :maxima)
   (initialize-runtime-globals)
   (let ((input-stream *standard-input*)
```
Now maxima is automatically initialized using sb-gmp and arithmetic is fast:
```
$ rmaxima 
Maxima 5.45.1 https://maxima.sourceforge.io
using Lisp SBCL 2.2.0
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) showtime : true $
Evaluation took 0.0001 seconds (0.0000 elapsed) using 0 bytes.
(%i2) a : 10^(10^5) $
Evaluation took 0.0017 seconds (0.0020 elapsed) using 13.516 KB.
(%i3) b : a^1280 $
Evaluation took 1.5245 seconds (1.5270 elapsed) using 50.689 MB.
(%i4) 
```
I want to try to fix an (unrelated) bug with the heap on maxima-ecl  (https://github.com/void-linux/void-packages/pull/34030#issuecomment-1005080267); I'll make a single PR with both.

  parent reply	other threads:[~2022-01-04 21:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 19:19 [ISSUE] " tornaria
2022-01-04 19:47 ` tornaria
2022-01-04 19:55 ` tornaria
2022-01-04 21:16 ` tornaria [this message]
2022-01-11 15:55 ` [ISSUE] [CLOSED] " leahneukirchen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220104211651.UZIXMeNbo4X0XVoEjY0qhmy-JJwE9FeN99th0S1xe3o@z \
    --to=tornaria@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).