Heikki Linnakangas <hlinn...@iki.fi> writes:
> Unfortunately, sqrt(x) isn't very cheap.
You'd be surprised: sqrt is built-in on most modern hardware. On my
three-year-old workstation, sqrt(x) seems to take about 2.6ns. For
comparison, the pack_float version posted in
takes 3.9ns (and draws multiple compiler warnings, too).
regards, tom lane
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: