Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)
Date: 2021-06-14 01:21:32
Message-ID: CAEudQAqp5ytKx117xSML9GHAKwtEH5Lcno8rD1BUAra2XecNYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em dom., 13 de jun. de 2021 às 09:43, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
escreveu:

> Hi Andres, thanks for taking a look.
>
> Em sáb., 12 de jun. de 2021 às 16:27, Andres Freund <andres(at)anarazel(dot)de>
> escreveu:
>
>> Hi,
>>
>> On 2021-06-12 10:55:22 -0300, Ranier Vilela wrote:
>> > With the recent changes at procarray.c, I take a look in.
>> > msvc compiler, has some warnings about signed vs unsigned.
>>
>> > 1. Size_t is weird, because all types are int.
>>
>> Not sure why I ended up using size_t here. There are cases where using a
>> natively sized integer can lead to better code being generated, so I'd
>> want to see some evaluation of the code generation effects.
>>
> Yes, sure.
>
I'm a little confused by the msvc compiler, but here's the difference in
code generation.
Apart from the noise caused by unnecessary changes regarding the names.

Microsoft (R) C/C++ Optimizing Compiler Versão 19.28.29915 para x64

diff attached.

regards,
Ranier Vilela

Attachment Content-Type Size
procarray_asm.diff application/octet-stream 15.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-06-14 01:24:12 Re: Different compression methods for FPI
Previous Message Tatsuo Ishii 2021-06-14 00:42:56 Re: Error on pgbench logs