Re: A micro-optimisation for walkdir()

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A micro-optimisation for walkdir()
Date: 2020-09-04 20:28:49
Message-ID: 20200904202849.GA17763@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-Sep-04, Juan José Santamaría Flecha wrote:

> On Fri, Sep 4, 2020 at 9:37 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
> wrote:
>
> > On 2020-Sep-04, Thomas Munro wrote:

> > >
> > > +/* File types for 'd_type'. */
> > > +enum
> > > + {
> > > + DT_UNKNOWN = 0,
> > > +# define DT_UNKNOWN DT_UNKNOWN
> >
> > Uhm ... what do these #defines do? They look a bit funny.
> >
> > Would it make sense to give this enum a name, and then use that name in
> > struct dirent's definition, instead of unsigned char?
>
> They mimic POSIX dirent.h. I would rather stick to that.

Ah ... they do?

If you remove the #define lines, what happens to your patch?

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Juan José Santamaría Flecha 2020-09-04 20:34:17 Re: A micro-optimisation for walkdir()
Previous Message Thomas Munro 2020-09-04 20:26:06 Re: [PATCH] Comments related to " buffer descriptors“ cache line size"