Re: Faster StrNCpy

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Faster StrNCpy
Дата
Msg-id 3776.1159565670@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Faster StrNCpy  (mark@mark.mielke.cc)
Ответы Re: Faster StrNCpy  (mark@mark.mielke.cc)
Список pgsql-hackers
mark@mark.mielke.cc writes:
> If anybody is curious, here are my numbers for an AMD X2 3800+:

You did not show your C code, so no one else can reproduce the test on
other hardware.  However, it looks like your compiler has unrolled the
memcpy into straight-line 8-byte moves, which makes it pretty hard for
anything operating byte-wise to compete, and is a bit dubious for the
general case anyway (since it requires assuming that the size and
alignment are known at compile time).

This does make me wonder about whether we shouldn't try the
strlen+memcpy implementation I proposed earlier ...
        regards, tom lane


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

Предыдущее
От: mark@mark.mielke.cc
Дата:
Сообщение: Re: Faster StrNCpy
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Per-database search_path