Re: Spinlock backoff algorithm

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mark Mielke <mark(at)mark(dot)mielke(dot)cc>, Magne Mæhre <Magne(dot)Mahre(at)Sun(dot)COM>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Spinlock backoff algorithm
Date: 2007-11-19 10:59:29
Message-ID: 47416C91.8080201@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark wrote:
> "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>
>> Mark Mielke <mark(at)mark(dot)mielke(dot)cc> writes:
>>> Tom Lane wrote:
>>>> My goodness that's a hardware-dependent proposal. Shall we discuss
>>>> how many CPUs there are where an integer division is *slower* than
>>>> a floating-point op?
>>> Do you have one in mind, or is this a straw man? :-)
>> I've got one upstairs (HPPA), and I believe that it's actually a pretty
>> common situation in scientifically-oriented workstations from a few
>> years back.
>
> I think floating point is fast on many common platforms, even many i386
> variants. But usually that's assuming you're comparing doing a whole bunch of
> work in floating point or integer math. Converting a bunch of integers to
> floating point for a single operation doesn't seem like a case that's going to
> shine on any floating point unit.

Just for fullness, task context switch is more complex (slower) when
application uses FP operation. It is not important for PostgreSQL
because it has FP operation on many places, but it is good to know.

Zdenek

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-11-19 12:20:21 Re: VACUUM/ANALYZE counting of in-doubt tuples
Previous Message Kris Jurka 2007-11-19 09:50:19 Re: pgsql: New versions of mingw have gettimeofday(), so add an autoconf