[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU AUCTeX branch, master, updated. 34befcc17649fd6615fd4ef8756fb787
From: |
Tassilo Horn |
Subject: |
Re: GNU AUCTeX branch, master, updated. 34befcc17649fd6615fd4ef8756fb78705f7fe55 |
Date: |
Tue, 22 Feb 2022 18:06:22 +0100 |
User-agent: |
mu4e 1.7.9; emacs 29.0.50 |
Arash Esbati <arash@gnu.org> writes:
Hi Arash,
>> --- a/latex.el
>> +++ b/latex.el
>> @@ -5849,11 +5849,13 @@ returned."
>> (catch 'found
>> (dolist (var (list LaTeX-math-list LaTeX-math-default))
>> (dolist (e var)
>
> Would it make sense to drop the outer dolist and replace
>
> (dolist (e var)
>
> with
> (dolist (e (append LaTeX-math-list LaTeX-math-default))
>
> Or am I missing something?
Yes, the performance aspect. The annotation function might be called
hundredth or thousands of times, and appending lists is expensive.
;; The current version
(benchmark 10000
'(LaTeX--completion-annotation-from-math-menu "aleph"))
"Elapsed time: 0.136648s"
;; Your proposed version
(benchmark 10000
'(LaTeX--completion-annotation-from-math-menu-with-append "aleph"))
"Elapsed time: 2.190776s (1.388426s in 18 GCs)"
So here it would almost be a factor of 20 slower.
Bye,
Tassilo
- Re: GNU AUCTeX branch, master, updated. 34befcc17649fd6615fd4ef8756fb78705f7fe55, Arash Esbati, 2022/02/22
- Re: GNU AUCTeX branch, master, updated. 34befcc17649fd6615fd4ef8756fb78705f7fe55,
Tassilo Horn <=
- Re: GNU AUCTeX branch, master, updated. 34befcc17649fd6615fd4ef8756fb78705f7fe55, Arash Esbati, 2022/02/23
- Re: GNU AUCTeX branch, master, updated. 34befcc17649fd6615fd4ef8756fb78705f7fe55, Tassilo Horn, 2022/02/23
- Re: GNU AUCTeX branch, master, updated. 34befcc17649fd6615fd4ef8756fb78705f7fe55, Arash Esbati, 2022/02/23
- Re: GNU AUCTeX branch, master, updated. 34befcc17649fd6615fd4ef8756fb78705f7fe55, Tassilo Horn, 2022/02/23
- Re: GNU AUCTeX branch, master, updated. 34befcc17649fd6615fd4ef8756fb78705f7fe55, Arash Esbati, 2022/02/23
- Re: GNU AUCTeX branch, master, updated. 34befcc17649fd6615fd4ef8756fb78705f7fe55, Tassilo Horn, 2022/02/23
- Re: GNU AUCTeX branch, master, updated. 34befcc17649fd6615fd4ef8756fb78705f7fe55, Tassilo Horn, 2022/02/24
Re: GNU AUCTeX branch, master, updated. 34befcc17649fd6615fd4ef8756fb78705f7fe55, David Kastrup, 2022/02/22