unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Boyer <robertstephenboyer@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 69480@debbugs.gnu.org
Subject: bug#69480: Emacs Lisp needs, for its great 'native-compile', 'declare' and 'the' for fixnums and arrays.
Date: Thu, 29 Feb 2024 14:54:46 -0600	[thread overview]
Message-ID: <CAP9n0TMu641Kya3Hvg72RnhBOHbv+SokVRzGY=5iQNVC+qD8Lw@mail.gmail.com> (raw)
In-Reply-To: <86edcvrpzg.fsf@gnu.org>

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

> You use benchmark incorrectly.

Huh?  Here is the documentation.

benchmark is an interactive native-compiled Lisp function in ‘benchmark.el’.

(benchmark REPETITIONS FORM)

Print the time taken for REPETITIONS executions of FORM.
Interactively, REPETITIONS is taken from the prefix arg, and
the command prompts for the form to benchmark.
For non-interactive use see also ‘benchmark-run’ and
‘benchmark-run-compiled’.
FORM can also be a function in which case we measure the time it takes
to call it without any argument.

  Probably introduced at or before Emacs version 22.1.

 > And you should use benchmark-run instead, anyway.

Thanks for that.  I'll give it a try.

>  It takes 16.7 sec on my system.

All of my times come from using a $100 Lenovo Chromebook.  How much did
your machine
cost?

> Emacs Lisp will never be able to produce performance similar to SBCL, not
the way
> native compilation implemented in Emacs.

Wanna bet?  There are too many geniuses working on Emacs to let this chance
for 8X pass.

Thanks for your reply.  My message was inspired by something someone said
when I sent
in a much simpler demo of the same 8x point, saying that one needed to show
the difference  on
real code.  So I have done so, I hope everyone agrees. Who is more famous
than Eratosthenese?

Bob


On Thu, Feb 29, 2024 at 2:11 PM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Robert Boyer <robertstephenboyer@gmail.com>
> > Date: Thu, 29 Feb 2024 13:40:14 -0600
> >
> > Consider this form:
> >
> > (progn (emacs-lisp-native-compile-and-load) (benchmark (build-sieve
> (expt 10 8)) 1))
> >
> > First of all, 'benchmark' has an obvious bug because it reports a time of
> > .000005 seconds.
>
> You use benchmark incorrectly.  And you should use benchmark-run
> instead, anyway.
>
> > After finding the file eratosthenese.el, the evaluation of the form above
> > takes 69 seconds in Emacs.
> >
> > After entering SBCL and loading eratosthenese.lisp, (build-sieve (expt
> 10 8))
> > takes 8 seconds.
>
> It takes 16.7 sec on my system.
>
> I see no bug here, native-compiled Emacs Lisp will never be able to
> produce performance similar to SBCL, not the way native compilation is
> implemented in Emacs.
>

[-- Attachment #2: Type: text/html, Size: 3085 bytes --]

  reply	other threads:[~2024-02-29 20:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 19:40 bug#69480: Emacs Lisp needs, for its great 'native-compile', 'declare' and 'the' for fixnums and arrays Robert Boyer
2024-02-29 20:10 ` Eli Zaretskii
2024-02-29 20:54   ` Robert Boyer [this message]
2024-02-29 22:10     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-01  6:45     ` Eli Zaretskii
2024-02-29 21:04   ` Robert Boyer
2024-03-01 11:28   ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-01 12:18     ` Andrea Corallo
2024-03-01 12:33       ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-01 12:45         ` Eli Zaretskii
2024-03-01 13:07           ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-01 13:41             ` Eli Zaretskii
2024-03-01 13:53               ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-01 14:07                 ` Andrea Corallo
2024-03-01 14:35                   ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-01 16:10                     ` Andrea Corallo
2024-03-01 19:36                       ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-01 16:34                 ` Eli Zaretskii
2024-03-01 19:36                   ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-01 12:40       ` Eli Zaretskii
2024-03-01 12:34     ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CAP9n0TMu641Kya3Hvg72RnhBOHbv+SokVRzGY=5iQNVC+qD8Lw@mail.gmail.com' \
    --to=robertstephenboyer@gmail.com \
    --cc=69480@debbugs.gnu.org \
    --cc=eliz@gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).