bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22689: [PATCH] Add logcount


From: Paul Eggert
Subject: bug#22689: [PATCH] Add logcount
Date: Sat, 30 Sep 2017 15:48:50 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

I looked at this patch after it landed in 'master'. Thanks for contributing it.

A couple of minor improvements. First, the implementation of logcount can use the count_one_bits functions already used by Emacs, rather than reinventing that wheel; these functions should be just as fast as __builtin_popcount etc. when using GCC. Second, logcount should count zero bits in negative numbers, for compatibility with Common Lisp. I installed the attached two patches to implement these improvements.

Attachment: 0001-Simplify-logcount-implementation.patch
Description: Text Data

Attachment: 0002-Make-logcount-act-like-CL-on-negative-arg.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]