unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Alan Mackenzie <acm@muc.de>,  Eli Zaretskii <eliz@gnu.org>,
	emacs-devel@gnu.org
Subject: Re: Excessive use of `eassert`
Date: Sun, 21 Jan 2024 10:54:24 -0500	[thread overview]
Message-ID: <jwvplxuznx0.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <811d5f03-fad4-47e1-b3fd-2f45229a5ee1@cs.ucla.edu> (Paul Eggert's message of "Sat, 20 Jan 2024 17:41:57 -0800")

> I looked into this a bit and installed the attached patches which should
> speed things slightly even with a default build.

Nice.

> The main goal was to speed up debugging builds, though.

I still get:

    (gdb) x/12i init_window
       0xbbabc <init_window>:       push   %ebx
       0xbbabd <init_window+1>:     sub    $0x18,%esp
       0xbbac0 <init_window+4>:     call   0x235b0 <__x86.get_pc_thunk.bx>
       0xbbac5 <init_window+9>:     add    $0x34652f,%ebx
       0xbbacb <init_window+15>:    lea    0xc(%esp),%eax
       0xbbacf <init_window+19>:    lea    0x383d4c(%ebx),%edx
       0xbbad5 <init_window+25>:    call   0xa2d57 <make_lisp_symbol>
       0xbbada <init_window+30>:    mov    0xc(%esp),%eax
       0xbbade <init_window+34>:    mov    %eax,0x334230(%ebx)
       0xbbae4 <init_window+40>:    add    $0x18,%esp
       0xbbae7 <init_window+43>:    pop    %ebx
       0xbbae8 <init_window+44>:    ret
    (gdb)

whereas with my patch this goes down to:

    (gdb) x/4i init_window
       0xb1715 <init_window>:       call   0x2ff9e <__x86.get_pc_thunk.ax>
       0xb171a <init_window+5>:     add    $0x31c8da,%eax
       0xb171f <init_window+10>:    movl   $0x0,0xe9d0(%eax)
       0xb1729 <init_window+20>:    ret
    (gdb)

🙁


        Stefan




  parent reply	other threads:[~2024-01-21 15:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18 22:35 Excessive use of `eassert` Stefan Monnier
2024-01-19  7:04 ` Eli Zaretskii
2024-01-19 13:01   ` Stefan Monnier
2024-01-19 15:02     ` Eli Zaretskii
2024-01-19 15:50       ` Stefan Monnier
2024-01-19 16:23         ` Eli Zaretskii
2024-01-19 17:44           ` Stefan Monnier
2024-01-19 19:42       ` Alan Mackenzie
2024-01-19 19:56         ` Eli Zaretskii
2024-01-21  1:41         ` Paul Eggert
2024-01-21  9:57           ` Eli Zaretskii
2024-01-21 20:35             ` Paul Eggert
2024-01-21 10:59           ` Alan Mackenzie
2024-01-22  5:19             ` Paul Eggert
2024-01-22 13:07               ` Stefan Monnier
2024-01-22 14:37               ` Alan Mackenzie
2024-01-23  7:51                 ` Paul Eggert
2024-01-23 11:42                   ` Alan Mackenzie
2024-01-24  1:04                     ` Paul Eggert
2024-01-24 15:09                       ` Alan Mackenzie
2024-01-26  8:06                         ` Paul Eggert
2024-01-21 15:54           ` Stefan Monnier [this message]
2024-01-22  4:12             ` Paul Eggert
2024-01-22 13:20               ` Stefan Monnier
2024-01-23  8:15                 ` Paul Eggert
2024-01-23 17:11                   ` Stefan Monnier
2024-01-24  7:45                     ` Paul Eggert
2024-01-23 18:16                   ` Eli Zaretskii
2024-01-23 19:50                     ` Stefan Monnier

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=jwvplxuznx0.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=acm@muc.de \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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).