From: "n.pettik" <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH 1/2] Move mp_compare_double_uint64() to trivia.h
Date: Wed, 14 Aug 2019 13:36:25 +0300 [thread overview]
Message-ID: <9688F1C1-2798-4D7C-A2B2-65ACDBC63E9D@tarantool.org> (raw)
In-Reply-To: <e20c257a-441e-7481-7fbb-ea30e8828619@tarantool.org>
> On 9 Aug 2019, at 00:37, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> wrote:
>
> Hi! Thanks for the patch!
>
>> diff --git a/src/trivia/util.h b/src/trivia/util.h
>> index 1e01013db..ebfe0c392 100644
>> --- a/src/trivia/util.h
>> +++ b/src/trivia/util.h
>> @@ -500,6 +500,20 @@ json_escape(char *buf, int size, const char *data);
>> } \
>> } while(0)
>>
>> +#define COMPARE_RESULT(a, b) (a < b ? -1 : a > b)
>> +
>> +/**
>> + * Compare LHS with RHS, return a value <0, 0 or >0 depending on the
>> + * comparison result (strcmp-style).
>> + * Normally, K==1. If K==-1, the result is inverted (as if LHS and RHS
>> + * were swapped).
>> + * K is needed to enable tail call optimization in Release build.
>> + * NOINLINE attribute was added to avoid aggressive inlining which
>
> I guess, NOINLINE does not make sense anymore. But you can keep a
> comment, that inlining should not be added in future for the sake
> of tail call optimization.
Thx, fixed:
diff --git a/src/trivia/util.h b/src/trivia/util.h
index ebfe0c392..8a3d22b38 100644
--- a/src/trivia/util.h
+++ b/src/trivia/util.h
@@ -508,8 +508,6 @@ json_escape(char *buf, int size, const char *data);
* Normally, K==1. If K==-1, the result is inverted (as if LHS and RHS
* were swapped).
* K is needed to enable tail call optimization in Release build.
- * NOINLINE attribute was added to avoid aggressive inlining which
- * resulted in over 2Kb code size for mp_compare_number.
*/
int
double_compare_uint64(double lhs, uint64_t rhs, int k);
Also fixed commit subject according to your nit:
Move mp_compare_double_uint64() to trivia/util.h
next prev parent reply other threads:[~2019-08-14 10:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-06 22:02 [tarantool-patches] [PATCH 0/2] Fix border case in float-int comparison in SQL Nikita Pettik
2019-08-06 22:02 ` [tarantool-patches] [PATCH 1/2] Move mp_compare_double_uint64() to trivia.h Nikita Pettik
2019-08-08 21:37 ` [tarantool-patches] ***UNCHECKED*** " Vladislav Shpilevoy
2019-08-14 10:36 ` n.pettik [this message]
2019-08-14 20:43 ` [tarantool-patches] " Vladislav Shpilevoy
2019-08-08 21:37 ` [tarantool-patches] ***UNCHECKED*** " Vladislav Shpilevoy
2019-08-06 22:02 ` [tarantool-patches] [PATCH 2/2] sql: use double_compare_uint64() for int<->float cmp Nikita Pettik
2019-08-22 12:31 ` [tarantool-patches] Re: [PATCH 0/2] Fix border case in float-int comparison in SQL Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9688F1C1-2798-4D7C-A2B2-65ACDBC63E9D@tarantool.org \
--to=korablev@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=v.shpilevoy@tarantool.org \
--subject='[tarantool-patches] Re: [PATCH 1/2] Move mp_compare_double_uint64() to trivia.h' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox