all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Win Treese <treese@acm.org>
Cc: emacs-devel@gnu.org
Subject: Re: Wondering about FACE_CACHE_BUCKETS_SIZE
Date: Wed, 10 Feb 2021 18:11:18 +0200	[thread overview]
Message-ID: <83mtwbj42h.fsf@gnu.org> (raw)
In-Reply-To: <673E9F11-29F6-4F5B-B754-34FD9776DDB6@acm.org> (message from Win Treese on Tue, 9 Feb 2021 21:53:34 -0500)

> From: Win Treese <treese@acm.org>
> Date: Tue, 9 Feb 2021 21:53:34 -0500
> 
> 
> I happened to be looking at some code in src/xfaces.c on the trunk, and I
> noticed this at lines 289-292:
> 
> /* Size of hash table of realized faces in face caches (should be a
>    prime number).  */
> 
> #define FACE_CACHE_BUCKETS_SIZE 1001
> 
> 1001 isn’t prime (it’s 7*11*13). A quick look at the hash table code
> suggest that the main effect of it is to slow things down a little bit
> because some hash buckets would get used more often than they
> would be with a prime. 
> 
> From the git log, it’s been this way since the code was first committed
> in 1999.
> 
> There’s probably no real problem here, except that the comment and
> code don’t match. On the other hand, 997 and 1009 are nice nearby
> primes if it really matters.

Thanks, I changed that to 1009.



      parent reply	other threads:[~2021-02-10 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10  2:53 Wondering about FACE_CACHE_BUCKETS_SIZE Win Treese
2021-02-10  9:08 ` tomas
2021-02-10 16:11 ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83mtwbj42h.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=treese@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.