Re: [HACKERS] [PATCH] SortSupport for macaddr type - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: [HACKERS] [PATCH] SortSupport for macaddr type
Date
Msg-id CAH2-WzmSOdXiWJBs7ZJO+WanE7TuQ6w4+_RkAGH_DyOhsts+9w@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [PATCH] SortSupport for macaddr type  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: [HACKERS] [PATCH] SortSupport for macaddr type  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On Sat, Mar 18, 2017 at 2:54 PM, Peter Geoghegan <pg@bowt.ie> wrote:
> This seems fine to me, especially
> because it lets us compare macaddr using simple 3-way unsigned int
> comparisons, which isn't otherwise the case.

Out of idle curiosity, I decided to generate disassembly of both
macaddr_cmp_internal(), and the patch's abbreviated comparator. The
former consists of 49 x86-64 instructions at -02 on my machine,
totaling 135 bytes of object code. The latter consists of only 10
instructions, or 24 bytes of object code.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] mat views stats
Next
From: Andrew Gierth
Date:
Subject: [HACKERS] Composite IS NULL again, this time with plpgsql