Re: [PATCH] dwarf_loader: use a better hashing function

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

 



Em Thu, Feb 11, 2021 at 10:55:32PM -0800, Bill Wendling escreveu:
> On Thu, Feb 11, 2021 at 5:01 AM Arnaldo Carvalho de Melo
> <acme@xxxxxxxxxx> wrote:
> >
> > Em Wed, Feb 10, 2021 at 05:31:48PM -0800, Andrii Nakryiko escreveu:
> > > On Wed, Feb 10, 2021 at 5:24 PM Bill Wendling <morbo@xxxxxxxxxx> wrote:
> > > > On Wed, Feb 10, 2021 at 4:00 PM Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote:
> > > > > On Wed, Feb 10, 2021 at 3:25 PM Bill Wendling <morbo@xxxxxxxxxx> wrote:
> > > > > > This hashing function[1] produces better hash table bucket
> > > > > > distributions. The original hashing function always produced zeros in
> > > > > > the three least significant bits.
> >
> > > > > > The new hashing funciton gives a modest performance boost.
> >
> > > > > >       Original      New
> > > > > >        0:11.41       0:11.38
> > > > > >        0:11.36       0:11.34
> > > > > >        0:11.35       0:11.26
> > > > > >       -----------------------
> > > > > >   Avg: 0:11.373      0:11.327
> >
> > > > > > for a performance improvement of 0.4%.
> >
> > > > > > [1] From Numerical Recipes, 3rd Ed. 7.1.4 Random Hashes and Random Bytes
> >
> > > > > Can you please also test with the one libbpf uses internally:
> >
> > > > > return (val * 11400714819323198485llu) >> (64 - bits);
> >
> > > > > ?
> >
> > > > It's giving me a running time of ~11.11s, which is even better. Would
> > > > you like me to submit a patch?
> >
> > > faster is better, so yeah, why not? :)
> >
> > Yeah, I agree, faster is better, please make it so :-)
> >
> Your wish is my command! :-) Done.

Thanks, looking for the patch and applying!

No go think about something else to make it faster 8-)

- Arnaldo



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux