From: "Herbert Euler" <herberteuler@hotmail.com>
Cc: rudalics@gmx.at, emacs-devel@gnu.org
Subject: Re: Patch: Syntax and Hard Newlines
Date: Wed, 29 Nov 2006 12:08:00 +0800 [thread overview]
Message-ID: <BAY112-F138E12FB7A04BF61D03D9DDAE40@phx.gbl> (raw)
In-Reply-To: <BAY112-F2FB467FC11C13B0F2119ADAE40@phx.gbl>
On timing, I meant.
Regards,
Guanpeng Xu
>From: "Herbert Euler" <herberteuler@hotmail.com>
>To: monnier@iro.umontreal.ca, rms@gnu.org
>CC: rudalics@gmx.at, emacs-devel@gnu.org
>Subject: Re: Patch: Syntax and Hard Newlines
>Date: Wed, 29 Nov 2006 12:06:12 +0800
>
>>I'm not completely sure whether your measurements are fair. Have you made
>>sure that syntax-ppss's caching doesn't give an unfair advantage to one or
>>the other? I'd suggest to try with a real "micro-benchmark" and use
>>parse-partial-sexp rather than syntax-ppss. You could also do it in a
>>real
>>buffer (e.g. turn off jit-lock, load a big Perl file: font-lock should
>>place a fair bit of syntax-table properties in there, then call
>>parse-partial-sexp with and without parse-sexp-lookup-properties).
>
>I copied the content of
>
> http://www.cpan.org/authors/id/W/WA/WAYNEM/betsie-1.5.12.pl
>
>many times so that got a Perl file of 268274172 bytes (257 MB). I
>then evaluated the following forms:
>
>(save-window-excursion (find-file "~/1.pl"))
> => #<buffer 1.pl>
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties nil))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 952121)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties t))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 977639)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties nil))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 936413)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties t))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 941655)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties nil))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 936427)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties t))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 985199)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties nil))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 928313)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties t))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 928447)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties nil))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 13 70452)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties t))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 929632)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties nil))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 926650)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties t))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 929234)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties nil))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 978655)
>
>(let (old-time
> time-diff
> (parse-sexp-lookup-properties t))
> (save-window-excursion
> (switch-to-buffer "1.pl")
> (font-lock-mode -1)
> (goto-char 268273054)
> (jit-lock-mode nil)
> (font-lock-mode 1)
> (setq old-time (current-time))
> (parse-partial-sexp 1 (point))
> (setq time-diff (time-subtract (current-time)
> old-time)))
> time-diff)
> => (0 12 928371)
>
>Can I conclude from this result that `parse-sexp-lookup-properties'
>has no effect over syntax parsing?
>
>Regards,
>Guanpeng Xu
>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today it's FREE!
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
>
>_______________________________________________
>Emacs-devel mailing list
>Emacs-devel@gnu.org
>http://lists.gnu.org/mailman/listinfo/emacs-devel
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
next prev parent reply other threads:[~2006-11-29 4:08 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-13 5:24 Patch: Syntax and Hard Newlines Herbert Euler
2006-11-13 5:52 ` Herbert Euler
2006-11-13 10:12 ` Herbert Euler
2006-11-13 20:15 ` Richard Stallman
2006-11-14 1:35 ` Herbert Euler
2006-11-15 3:14 ` Richard Stallman
2006-11-13 19:43 ` Stefan Monnier
2006-11-14 1:19 ` Herbert Euler
2006-11-14 6:51 ` Stefan Monnier
2006-11-14 7:35 ` Herbert Euler
2006-11-14 15:00 ` Stefan Monnier
2006-11-15 1:32 ` Herbert Euler
2006-11-15 3:58 ` Stefan Monnier
2006-11-15 4:24 ` Herbert Euler
2006-11-16 6:22 ` Richard Stallman
2006-11-30 6:36 ` Herbert Euler
2006-11-30 14:52 ` Stefan Monnier
2006-12-02 17:56 ` Richard Stallman
2006-12-07 18:46 ` Stefan Monnier
2006-12-08 5:04 ` Richard Stallman
2006-12-08 7:44 ` Stefan Monnier
2006-12-09 1:25 ` Richard Stallman
2006-12-09 3:50 ` Stefan Monnier
2006-12-09 18:25 ` Richard Stallman
2006-11-15 4:37 ` Herbert Euler
2006-11-15 7:26 ` Miles Bader
2006-11-15 14:03 ` Stefan Monnier
2006-11-15 15:47 ` Johan Bockgård
2006-11-15 16:37 ` Stefan Monnier
2006-11-16 15:01 ` Richard Stallman
2006-11-16 15:01 ` Richard Stallman
2006-11-23 9:33 ` Johan Bockgård
2006-11-14 12:27 ` Richard Stallman
2006-11-14 15:08 ` Stefan Monnier
2006-11-15 22:58 ` Richard Stallman
2006-11-13 20:15 ` Richard Stallman
2006-11-14 1:42 ` Herbert Euler
2006-11-14 8:36 ` Herbert Euler
2006-11-14 11:38 ` Herbert Euler
2006-11-14 15:03 ` Stefan Monnier
2006-11-16 6:23 ` Herbert Euler
2006-11-16 8:42 ` martin rudalics
2006-11-16 10:47 ` Herbert Euler
2006-11-16 12:18 ` martin rudalics
2006-11-16 12:37 ` Herbert Euler
2006-11-16 12:57 ` martin rudalics
2006-11-16 15:12 ` Herbert Euler
2006-11-16 16:03 ` martin rudalics
2006-11-17 1:24 ` Herbert Euler
2006-11-17 2:27 ` Stefan Monnier
2006-11-17 1:36 ` Herbert Euler
2006-11-16 14:22 ` Stefan Monnier
2006-11-17 6:30 ` Herbert Euler
2006-11-17 18:39 ` martin rudalics
2006-11-18 0:51 ` Herbert Euler
2006-11-18 14:34 ` martin rudalics
2006-11-18 15:21 ` Miles Bader
2006-11-19 11:11 ` martin rudalics
2006-11-19 18:14 ` Stefan Monnier
2006-11-20 1:37 ` Richard Stallman
2006-11-20 3:04 ` Stefan Monnier
2006-11-20 23:57 ` Richard Stallman
2006-11-21 0:03 ` David Kastrup
2006-11-22 13:15 ` Richard Stallman
2006-11-22 13:50 ` David Kastrup
2006-11-24 22:49 ` Richard Stallman
2006-11-26 11:42 ` Kim F. Storm
2006-11-26 12:08 ` David Kastrup
2006-11-26 18:32 ` Kim F. Storm
2006-11-26 19:53 ` David Kastrup
2006-12-05 17:43 ` David Reitter
2006-12-06 14:24 ` Richard Stallman
2006-12-08 9:03 ` David Reitter
2006-11-20 7:39 ` martin rudalics
2006-11-20 10:13 ` David Kastrup
2006-11-20 7:09 ` Herbert Euler
2006-11-20 8:03 ` martin rudalics
2006-11-19 0:58 ` Stefan Monnier
2006-11-19 12:47 ` Richard Stallman
2006-11-19 18:09 ` Stefan Monnier
2006-11-20 12:59 ` Richard Stallman
2006-11-21 3:45 ` Herbert Euler
2006-11-22 13:15 ` Richard Stallman
2006-11-23 3:27 ` Herbert Euler
2006-11-26 2:01 ` Richard Stallman
2006-11-27 1:10 ` Stefan Monnier
2006-11-29 4:06 ` Herbert Euler
2006-11-29 4:08 ` Herbert Euler [this message]
2006-11-29 4:57 ` Stefan Monnier
2006-11-29 7:36 ` Herbert Euler
2006-11-29 11:28 ` Stefan Monnier
2006-11-30 3:20 ` Richard Stallman
2006-11-29 8:13 ` David Kastrup
2006-11-19 7:59 ` Richard Stallman
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=BAY112-F138E12FB7A04BF61D03D9DDAE40@phx.gbl \
--to=herberteuler@hotmail.com \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
/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).