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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4