From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: andres@anarazel.de
Cc: thomas.munro@enterprisedb.com
Cc: andrew@tao11.riddles.org.uk
Cc: david.rowley@2ndquadrant.com
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Using POPCNT and other advanced bit manipulation instructions
Date: Fri, 15 Feb 2019 10:05:38 -0500
Message-ID: <986.1550243138@sss.pgh.pa.us> (raw)
In-Reply-To: <20190215144123.GA31671@alvherre.pgsql>
References: <20190215144123.GA31671@alvherre.pgsql>
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Ah, I understand it now:
> https://stackoverflow.com/questions/25683690/confusion-about-bsr-and-lzcnt/43443701#43443701
> if you call LZCNT/TZCNT on a CPU that doesn't support it, it won't raise
> SIGILL or anything ... it'll just silently compute the wrong result.
> That's certainly not what I call a fallback!
Yeah, that's pretty nasty; it means there's no backstop for whether
your choose function gets it right :-(
Is POPCNT any better in this respect?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, horiguchi.kyotaro@lab.ntt.co.jp, andres@anarazel.de, thomas.munro@enterprisedb.com, andrew@tao11.riddles.org.uk, david.rowley@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Using POPCNT and other advanced bit manipulation instructions
In-Reply-To: <986.1550243138@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox