emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stack-allocated objects again (+benchmark)


From: Dmitry Antipov
Subject: Stack-allocated objects again (+benchmark)
Date: Mon, 29 Sep 2014 11:09:10 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

1) In r117971, I've made an attempt to follow KISS principle and
redesign this stuff for simplicity and speed rather than versatility.

2) I am constantly asked about benchmarks.  OK, running this code:

(defun put-property-benchmark ()
  (interactive)
  (setq buffer-undo-list t)
  (let ((oldgc gcs-done)
        (oldtime (float-time)))
    (while (re-search-forward "[a-f0-9]+" nil t)
      (put-text-property (match-beginning 0) (match-end 0)
                         'face 'font-lock-comment-face))
    (message "GCs: %d Elapsed time: %f seconds"
             (- gcs-done oldgc) (- (float-time) oldtime))))

through a ~35M dump generated with

od -v -t x2 < glibc-2.19.tar.xz > glibc.txt

shows 55GCs/23.7s with USE_STACK_LISP_OBJECTS and 66GCs/27.9s
without them.  Hopefully this simple benchmark is "real enough".

Dmitry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]