Re: [HACKERS] Do we need the gcc feature "__builtin_expect" topromote the branches prediction? - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [HACKERS] Do we need the gcc feature "__builtin_expect" topromote the branches prediction?
Date
Msg-id CAMsr+YGn94r9NXEtgmMATYFaKKd-ndyqpFxzb02Z_8mtU8QCFA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Do we need the gcc feature "__builtin_expect" topromote the branches prediction?  (Hao Lee <mixtrue@gmail.com>)
List pgsql-hackers
On 6 June 2017 at 10:44, Hao Lee <mixtrue@gmail.com> wrote:
> and another things come into my mind, in some scenario, as we know that the
> native library is not the most effective way to do that, such as, allocation
> a large amount of memories by using "alloc()"... and "memmove()", so on. As
> the SIMD instruction became the standard in CPU, therefore, we can that to
> do something more effectively. for example, using SIMD to impl
> 'alloc',"memmove" and so on, or the other database operations. and it seems
> that there some one have done this job.

Compilers are already pretty good at this.

https://en.wikipedia.org/wiki/Program_optimization


-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Hao Lee
Date:
Subject: Re: [HACKERS] Do we need the gcc feature "__builtin_expect" topromote the branches prediction?
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Server ignores contents of SASLInitialResponse