Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 2 Jun 2023 10:03:07 +0200
From: Jₑₙₛ Gustedt <jens.gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: Re: [C23 new stdlib 2/4] C23: add the memalignment function

Alexander,

on Thu, 1 Jun 2023 16:35:04 +0300 (MSK) you (Alexander Monakov
<amonakov@...ras.ru>) wrote:

> On Thu, 25 May 2023, Jₑₙₛ Gustedt wrote:
> 
> > Rich,
> > 
> > on Wed, 24 May 2023 17:28:35 -0400 you (Rich Felker
> > <dalias@...c.org>) wrote:
> >   
> > > There's a more efficient implementation of this function which
> > > does not depend on __builtin_ctzll (which we don't): p^(p-1)&p  
> > 
> > yes, nice
> > 
> > If you have other such nice formulas for some of the interfaces in
> > <stdbit.h>, please let me know. They are hard to find in search
> > engines.  
> 
> It seems this was unanswered. Hacker's Delight by Henry Warren offers
> a lot of material on such topics. For this particular question it also
> gives the efficient implementation: 'p & -p'.

right, even better

> I looked over the recently posted stdbit.h patch and I don't have
> anything to suggest in terms of formulas. The things that would worry
> me are of a different nature anyway.

Could you share those that concern this particular new header
<stdbit.h> ? (Perhaps in the thread with the patches?)

Thanks
Jₑₙₛ

-- 
:: ICube :::::::::::::::::::::::::::::: deputy director ::
:: Université de Strasbourg :::::::::::::::::::::: ICPS ::
:: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus ::
:: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 ::
:: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.