emacs-devel
[Top][All Lists]
Advanced

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

Re: Dynamic loading progress


From: Eli Zaretskii
Subject: Re: Dynamic loading progress
Date: Tue, 17 Mar 2015 13:08:30 +0200

> Date: Tue, 17 Mar 2015 11:51:44 +0100
> From: Aurélien Aptel <address@hidden>
> Cc: Stephen Leake <address@hidden>, 
>       Emacs development discussions <address@hidden>
> 
> On Tue, Mar 17, 2015 at 10:52 AM, Eli Zaretskii <address@hidden> wrote:
> > Actually, most accesses to buffer text do precisely that: access one
> > character at a time.  The API typically accepts the buffer position.
> > Why do you think this is inefficient?
> 
> Iterating on a buffer content will need, for each character (I think)
> 2 funcalls (char-after, forward-char) and a fixnum -> int64_t
> conversion. It seems like a non-negligible overhead, but maybe it
> isn't, I don't know...

Why do we need to go through char-after, with the induced fixnum
conversion?  Why not simply return a character, which we know in
advance will fit into a C 'int'?

Once again, what I had in mind is a function that gets buffer position
and returns the character at that position, as a C 'int'.  That's
all.  I see no reason to go through Lisp primitives for that job.
Maybe I'm missing something.




reply via email to

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