|
Message-ID: <20150624041950.GM1173@brightrain.aerifal.cx> Date: Wed, 24 Jun 2015 00:19:50 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: [PATCH 2/5] dynlink.c: compute modulus via magic multiplication On Wed, Jun 24, 2015 at 07:18:28AM +0300, Alexander Monakov wrote: > On Wed, 24 Jun 2015, Alexander Monakov wrote: > > diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c > > index fa91b39..99dadd4 100644 > > --- a/src/ldso/dynlink.c > > +++ b/src/ldso/dynlink.c > > @@ -41,6 +41,11 @@ struct td_index { > > struct td_index *next; > > }; > > > > +struct udiv { > > + uint32_t mul; > > + int s1, s2, inc; > > +}; > > Can use 'char' rather than 'int' here. Yes, that seems like a nice size improvement, and it might also allow the compiler to do additional optimizations based on knowledge of the range. Rich
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.