all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Theodor Thornhill <theo@thornhill.no>
To: Stefan Monnier <monnier@iro.umontreal.ca>, Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org, casouri@gmail.com
Subject: Re: CC Mode -> Tree sitter challenge
Date: Sat, 05 Nov 2022 15:46:33 +0100	[thread overview]
Message-ID: <1A0839BF-7808-4BC5-B0AA-0A9D01F06EC3@thornhill.no> (raw)
In-Reply-To: <jwvfsexsci1.fsf-monnier+emacs@gnu.org>



On 5 November 2022 15:34:25 CET, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> We usually use something like the below:
>>
>>   (defun scroll-up-benchmark ()
>>     (interactive)
>>     (let ((oldgc gcs-done)
>> 	  (oldtime (float-time)))
>>       (condition-case nil (while t (scroll-up) (redisplay))
>> 	(error (message "GCs: %d Elapsed time: %f seconds"
>> 			(- gcs-done oldgc) (- (float-time) oldtime))))))
>>
>>   (defun scroll-up-by-40-benchmark ()
>>     (interactive)
>>     (let ((oldgc gcs-done)
>> 	  (oldtime (float-time)))
>>       (condition-case nil (while t (scroll-up 40) (redisplay))
>> 	(error (message "GCs: %d Elapsed time: %f seconds"
>> 			(- gcs-done oldgc) (- (float-time) oldtime))))))
>
>See also the `elisp-benchmark` package, especially its
>`benchmarks/elb-scroll.el` which shows how to do that in batch mode.
>
>We could tweak that file to define not just `elb-scroll-entry` but also
>`elb-cc-scroll-entry` to compare the time between the use of
>`elb-smie-mode` (whose purpose is not to show how it compares to
>CC-mode's C mode but rather to have a non-varying code across Emacs
>versions, so we can see the effect of other factors than the mode
>itself) and CC-mode's `c-mode` and another using your new `c-mode`.
>
>
>        Stefan
>

Thanks! I'll check it out

Theo



      reply	other threads:[~2022-11-05 14:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04 20:34 CC Mode -> Tree sitter challenge Theodor Thornhill
2022-11-04 20:36 ` Theodor Thornhill
2022-11-04 20:38 ` Stefan Monnier
2022-11-04 20:44   ` Theodor Thornhill
2022-11-04 23:10 ` Yuan Fu
2022-11-05  7:56   ` Theodor Thornhill
2022-11-06  1:01     ` Yuan Fu
2022-11-06  5:54       ` Theodor Thornhill
2022-11-05  9:13 ` Eli Zaretskii
2022-11-05 13:12   ` Theodor Thornhill
2022-11-05 13:31     ` Eli Zaretskii
2022-11-05 13:42       ` Theodor Thornhill
2022-11-05 14:37       ` Theodor Thornhill
2022-11-05 14:55         ` Eli Zaretskii
2022-11-05 15:06           ` Theodor Thornhill
2022-11-05 15:27             ` Theodor Thornhill
2022-11-05 16:38               ` Theodor Thornhill
2022-11-05 16:43                 ` Eli Zaretskii
2022-11-06  1:13                 ` Yuan Fu
2022-11-06  6:04                   ` Theodor Thornhill
2022-11-07  0:11                     ` Yuan Fu
2022-11-07  8:05                       ` Theodor Thornhill
2022-11-05 14:34   ` Stefan Monnier
2022-11-05 14:46     ` Theodor Thornhill [this message]

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=1A0839BF-7808-4BC5-B0AA-0A9D01F06EC3@thornhill.no \
    --to=theo@thornhill.no \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.