aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2019-07-22 22:09:05 -0700
committerPaul Eggert2019-07-22 22:09:27 -0700
commit56a3e4a5d366a8453608d9a604ebd5ddb4e52245 (patch)
tree86b0bc40f4e5fe7b741dac3f937c1523f51f246a /src
parentf378ed1a0b1ca2ceed5afabcf5f303ae339039ba (diff)
downloademacs-56a3e4a5d366a8453608d9a604ebd5ddb4e52245.tar.gz
emacs-56a3e4a5d366a8453608d9a604ebd5ddb4e52245.zip
Tweak performance of cmpfn_profiler
* src/profiler.c (cmpfn_profiler): Improve performance when VECTORP (bt1) && EQ (bt1, bt2).
Diffstat (limited to 'src')
-rw-r--r--src/profiler.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/profiler.c b/src/profiler.c
index ed0e9ddd881..6b482abf335 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -530,7 +530,9 @@ the same lambda expression, or are really unrelated function. */)
530static Lisp_Object 530static Lisp_Object
531cmpfn_profiler (Lisp_Object bt1, Lisp_Object bt2, struct Lisp_Hash_Table *h) 531cmpfn_profiler (Lisp_Object bt1, Lisp_Object bt2, struct Lisp_Hash_Table *h)
532{ 532{
533 if (VECTORP (bt1) && VECTORP (bt2)) 533 if (EQ (bt1, bt2))
534 return Qt;
535 else if (VECTORP (bt1) && VECTORP (bt2))
534 { 536 {
535 ptrdiff_t l = ASIZE (bt1); 537 ptrdiff_t l = ASIZE (bt1);
536 if (l != ASIZE (bt2)) 538 if (l != ASIZE (bt2))
@@ -541,7 +543,7 @@ cmpfn_profiler (Lisp_Object bt1, Lisp_Object bt2, struct Lisp_Hash_Table *h)
541 return Qt; 543 return Qt;
542 } 544 }
543 else 545 else
544 return EQ (bt1, bt2) ? Qt : Qnil; 546 return Qnil;
545} 547}
546 548
547static Lisp_Object 549static Lisp_Object