From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Explain syntax-ppss-stats please
Date: Sat, 05 Apr 2008 14:53:17 -0400 [thread overview]
Message-ID: <jwvtzigw32w.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <47F79FFA.2000806@gmail.com> (Lennart Borgman's message of "Sat, 05 Apr 2008 17:51:22 +0200")
> I do not understand the use of syntax-ppss-stats at all. Where is it used?
> (I can only see that the 5:th element is read.) How does it work?
Only the 5th element is really used. The rest was added there during
development to tune the algorithm. It could be removed.
As for the 5th element it's used to keep track of the average size of
a "defun", so as to know whether to use the closest cache location, or
to try and find a closer location with syntax-begin-function: if the
closest cache location is 100KB earlier and syntax-begin-function
usually finds a safe point within 10KB, we're better off calling
syntax-begin-function (when tho it'll typically take a while itself)
than running parse-partial-sexp on the 100KB. But OTOH if
syntax-begin-function usually needs to look back 200KB to find a safe
spot, then just the call to syntax-begin-function might take us longer
than just running parse-partial-sexp on the 100KB.
Stefan
next prev parent reply other threads:[~2008-04-05 18:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-05 15:51 Explain syntax-ppss-stats please Lennart Borgman (gmail)
2008-04-05 18:53 ` Stefan Monnier [this message]
2008-04-06 1:25 ` Lennart Borgman (gmail)
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=jwvtzigw32w.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=lennart.borgman@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.