Re: Some platform-specific MemSet research

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Some platform-specific MemSet research
Дата
Msg-id 20060124224946.GC18870@svana.org
обсуждение исходный текст
Ответ на Some platform-specific MemSet research  (Seneca Cunningham <scunning@ca.afilias.info>)
Ответы Re: Some platform-specific MemSet research  (Seneca Cunningham <scunning@ca.afilias.info>)
Список pgsql-hackers
On Tue, Jan 24, 2006 at 05:24:28PM -0500, Seneca Cunningham wrote:
> After reading the post on -patches proposing that MemSet be changed to
> use long instead of int32 on the grounds that a pair of x86-64 linux
> boxes took less time to execute the long code 64*10^6 times[1], I took a
> look at how the testcode performed on AIX with gcc.  While the switch to
> long did result in a minor performance improvement, dropping the
> MemSetLoop in favour of the native memset resulted in the tests taking
> ~25% the time as the MemSetLoop-like int loop. The 32-bit linux system I
> ran the expanded tests on showed that for the buffer size range that
> postgres can use the looping MemSet instead of memset (size <= 1024
> bytes), MemSet generally had better performance.

Could you please check the asm output to see what's going on. We've had
tests like these produce odd results in the past because the compiler
optimised away stuff that didn't have any effect. Since every memset
after the first is a no-op, you want to make sure it's still actually
doing the work...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Seneca Cunningham
Дата:
Сообщение: Some platform-specific MemSet research
Следующее
От: Andrew - Supernews
Дата:
Сообщение: Re: Cleaning up the INET/CIDR mess