Skip to content

Instantly share code, notes, and snippets.

@casouri
Created January 21, 2023 02:54
Show Gist options
  • Save casouri/3ca3105d73c883475a3e2f01567c7d22 to your computer and use it in GitHub Desktop.
Save casouri/3ca3105d73c883475a3e2f01567c7d22 to your computer and use it in GitHub Desktop.
(defun scroll-up-benchmark ()
(interactive)
(let ((oldgc gcs-done)
(oldtime (float-time))
(count 0))
(condition-case nil (while t (scroll-up) (redisplay) (cl-incf count))
(error (message "GCs: %d Elapsed time: %f seconds Second/scroll: %f"
(- gcs-done oldgc) (- (float-time) oldtime)
(/ (- (float-time) oldtime) count))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment