Re: GiST penalty functions [PoC]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: amborodin(at)acm(dot)org, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Михаил Бахтерев <mike(dot)bakhterev(at)gmail(dot)com>
Subject: Re: GiST penalty functions [PoC]
Date: 2016-09-07 21:58:42
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Heikki Linnakangas <hlinnaka(at)iki(dot)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

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2016-09-07 22:57:15 Re: Long options for pg_ctl waiting
Previous Message Jim Nasby 2016-09-07 21:44:20 Re: (Comment)Bug in CteScanNext