GNU bug report logs - #22689
25.1.50; implement logcount

Previous Next

Package: emacs;

Reported by: Mark Oteiza <mvoteiza <at> udel.edu>

Date: Mon, 15 Feb 2016 23:20:01 UTC

Severity: wishlist

Found in version 25.1.50

Done: Mark Oteiza <mvoteiza <at> udel.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Mark Oteiza <mvoteiza <at> udel.edu>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 22689 <at> debbugs.gnu.org
Subject: bug#22689: [PATCH] Add logcount
Date: Sat, 30 Sep 2017 15:48:50 -0700
[Message part 1 (text/plain, inline)]
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.
[0001-Simplify-logcount-implementation.patch (text/x-patch, attachment)]
[0002-Make-logcount-act-like-CL-on-negative-arg.patch (text/x-patch, attachment)]

This bug report was last modified 7 years and 291 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.