From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Emacs benchmark workload to run and time instead of hunch performance Date: Wed, 09 Jul 2014 01:30:24 +0200 Organization: Aioe.org NNTP Server Message-ID: <87ha2r1l9r.fsf@debian.uxu> References: <87pphgirk7.fsf@debian.uxu> <87zjgjyj45.fsf@debian.uxu> <87simbzcdm.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1404862533 1506 80.91.229.3 (8 Jul 2014 23:35:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Jul 2014 23:35:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 09 01:35:29 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X4ev1-0006go-UX for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Jul 2014 01:35:28 +0200 Original-Received: from localhost ([::1]:58179 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4ev1-0003yX-2t for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Jul 2014 19:35:27 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 78 Original-NNTP-Posting-Host: SIvZRMPqRkkTHAHL6NkRuw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:x8b9z4JH3CmD03gQSzj3c306i+Y= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:206326 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98593 Archived-At: Emanuel Berg did write: > What I can see from looking a the screenshot and > skimming the README.md this measures Emacs startup > time (esup) - but if you read my post, I said there > is no reason (for me at least) to do that, as I have > the OS automatically start Emacs after booting, so > for me it is part of the boot process. After that I > never close Emacs until I'm done for the time being, > closing Emacs as well as shutting down the > computer. And that is the recommended usage. It can > of course be interesting to measure startup time but > for my practical situation it wouldn't hurt (really) > if Emacs took 10 minutes to start! No, I asked for > some benchmark workload to run that would emulate or > to a degree actually perform what could be considered > normal emaxing - that way, the exact same workload > could be run with and without (emacs -Q) extensive > configuration and the require and load of modules, > and then the times could be compared. In C, there is > a way of hammering the DRAM and the memory bus (both > of which might be shared on a multiprocessor > architecture) with memory accesses that will crash > through the core-local caches: it is called pointer > chasing and is basically creating lots of pointers > and then assigning values and dereferencing the > pointers... Pretty simple and effective. Because > Emacs is much more complicated, the method perhaps > must be, too (?); but actually any Elisp could be > executed and timed this way to give some estimate. It is as I feared. Blinded by success, the bright side has grown complacent, allowing the dark side to regroup unhindered. Only the super-senses of the sleep-and-food-deprived Jedi Knights alerted us to this grave danger! Not-very-ambitious workload but still: (defun bench () (interactive) (define-abbrev global-abbrev-table "rsb" "rec.sport.boxing") (insert "rsb") (expand-abbrev) (insert " 3") (backward-char 3) (delete-char 2) (buffer-menu) (man "ls") (beginning-of-buffer) ) (progn (elp-instrument-function 'bench) (bench) (elp-results) ) Execution times for first invocation: emacs -Q: bench 1 0.038667778 0.038667778 emacs, with tons of configuration: bench 1 0.05604648 0.05604648 Keep calling it I guess it ends up in a cache because it gets much faster - but the emacs -Q is still faster. So the next question is just what configs slows it down - if there is indeed a difference there... -- underground experts united