|
From: | Andrea Corallo |
Subject: | Re: Correct line/column numbers in byte compiler messages |
Date: | Sat, 21 Mar 2020 18:37:13 +0000 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Have to apologize this is probably the quarantine effect but I couldn't resist testing this: #+BEGIN_SRC lisp ;; -*- lexical-binding: t; -*- (require 'cl-lib) (defvar elb-list (cl-loop for i from 0 to 1500000 if (cl-oddp i) collect 'a else collect 'b)) (defun elb-eq () (let ((n 0)) (dolist (l elb-list n) (when (eq 'b l) (cl-incf n))))) (defun elb-eq-entry () (dotimes (_ 1000) (elb-eq))) #+END_SRC Results: b619777dd6 (baseline) 50.09s accurate-warning-pos 51.28s This is about 2% perf penalty. Interestingly with the __builtin_expect trick applied exec time gets back to 50.65s. We could probably find a benchmark that better highlights the difference (this is potentially dominated by cache misses while pointer chasing the list) but is it worth? Regards Andrea -- address@hidden
[Prev in Thread] | Current Thread | [Next in Thread] |