help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is Elisp slow?


From: Ergus
Subject: Re: Why is Elisp slow?
Date: Tue, 7 May 2019 15:40:23 +0200
User-agent: NeoMutt/20180716

On Tue, May 07, 2019 at 10:16:42PM +0900, ????????? wrote:

Yes, it is not straight forward, but that's what makes it more
interesting (and useful).

I still think that provide a plugin for SBCL is the best to do it native
and efficient, but I have zero knowledge about the SBCL infrastructure
for that. But the idea of adding it some C bindings is not
crazy. Specially because all the functions have the same signature. We
just need some documentation about the internal data structure
representations in SBCL.

Ahh??? I now understood what???s the problem. :-(

2019. 5. 7. ?????? 10:04, Stefan Monnier <monnier@IRO.UMontreal.CA> ??????:

Similarly, you'll need to rewrite all the functions/macros like CONSP,
SYMBOLP, FIXNUMP, XCAR, XCDR, make_fixnum, ...  Performance of those
is important.

Why would you not use the default CL???s defun, car, cdr, symbol-p,
cons-p, etc, etc?

I'm talking the work needed to adapt Emacs's C code, e.g:

   DEFUN ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 0, 2, 0,
          doc: /* Return a window currently displaying BUFFER-OR-NAME, or nil 
if none.
   BUFFER-OR-NAME may be a buffer or a buffer name and defaults to
   the current buffer.

   The optional argument ALL-FRAMES specifies the frames to consider:

   - t means consider all windows on all existing frames.

   - `visible' means consider all windows on all visible frames.

   - 0 (the number zero) means consider all windows on all visible
       and iconified frames.

   - A frame means consider all windows on that frame only.

   Any other value of ALL-FRAMES means consider all windows on the
   selected frame and no others.  */)
        (Lisp_Object buffer_or_name, Lisp_Object all_frames)
   {
     Lisp_Object buffer;

     if (NILP (buffer_or_name))
       buffer = Fcurrent_buffer ();
     else
       buffer = Fget_buffer (buffer_or_name);

     if (BUFFERP (buffer))
       return window_loop (GET_BUFFER_WINDOW, buffer, true, all_frames);
     else
       return Qnil;
   }


-- Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]