From: Sergey Nikiforov <void@tarantool.org>
To: Leonid Vasiliev <lvasiliev@tarantool.org>,
tarantool-patches@dev.tarantool.org
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v3 2/2] base64: improve decoder performance
Date: Fri, 25 Dec 2020 13:39:22 +0300 [thread overview]
Message-ID: <c0d7ed81-87d7-9f9a-e9e4-93240e74b41a@tarantool.org> (raw)
In-Reply-To: <810f25cf-1c5e-3358-2050-4b0ce2f6ece4@tarantool.org>
Hi!
On 24.12.2020 17:08, Leonid Vasiliev wrote:
> Hi! Thank you for the patch.
> AFAIU the status of the patch is follows:
>
> > But I see we are not going anywhere here. You don't really need LGTM
> > from me on this patch, if you don't want to finish it. I am not
> > strictly against these changes, because *probably* they don't add new
> > bugs, and seem to be a tiny bit better for perf. I only don't like it
> > being not finished.
>
> I think the changes are ok, because they are good for perf (and we have
> confirmation) and don't add degradation (our tests should guarantee
> this).
>
> See some comments below:
>
> What about a benchmark. AFAIK A. Lyapunov propose saving all benchmarks
> that we used. Did you have a conversation with him?
Yes, I had. "perf" in tarantool. Benchmark framework is not yet merged
(https://github.com/tarantool/tarantool/tree/i.kosarev/gh-5385-tiny-tuples-with-perf-test/perf)
so I plan to commit my microbenchmark a little later to avoid duplication.
> On 22.12.2020 13:41, Sergey Nikiforov wrote:
>> Unnecessary checks were removed from internal loops.
>> Benchmark shows that performance is now ~1.19 times higher
>> (release build, Intel Core I7-9700K, only one thread).
>> ---
>>
>> Branch:
>> https://github.com/tarantool/tarantool/tree/void234/gh-3069-fix-base64-memory-overrun-v3
>>
>>
>> test/unit/base64.c | 7 +++-
>> test/unit/base64.result | 84 +++++++++++++++++++++++++++--------------
>> third_party/base64.c | 36 +++++++++++++-----
>> 3 files changed, 89 insertions(+), 38 deletions(-)
>>
>
> I left my questions about the test in the review of the previous patch.
Fixed.
>> diff --git a/third_party/base64.c b/third_party/base64.c
>> index 3350a98ff..93442c04b 100644
>> --- a/third_party/base64.c
>> +++ b/third_party/base64.c
>> @@ -257,10 +257,11 @@ base64_decode_block(const char *in_base64, int
>> in_len,
>> {
>> case step_a:
>> do {
>> - if (in_pos == in_end || out_pos >= out_end)
>> + if (in_pos >= in_end)
>> {
>> state->step = step_a;
>> - state->result = curr_byte;
>> + /* curr_byte is useless now */
>> + /* state->result = curr_byte; */
>
> For multi-line comment, we use the following format:
> /*
> * First line
> * Second line
> */
>
> And leaving a commented code is not best practice.
Fixed.
next prev parent reply other threads:[~2020-12-25 10:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 10:41 [Tarantool-patches] [PATCH v3 0/2] base64: fix decoder, improve its performance Sergey Nikiforov
2020-12-22 10:41 ` [Tarantool-patches] [PATCH v3 1/2] base64: fix decoder output buffer overrun (reads) Sergey Nikiforov
2020-12-24 12:28 ` Leonid Vasiliev
2020-12-22 10:41 ` [Tarantool-patches] [PATCH v3 2/2] base64: improve decoder performance Sergey Nikiforov
2020-12-22 15:05 ` Vladislav Shpilevoy
2020-12-22 16:16 ` Sergey Nikiforov
2020-12-22 16:40 ` Vladislav Shpilevoy
2020-12-24 14:08 ` Leonid Vasiliev
2020-12-25 10:39 ` Sergey Nikiforov [this message]
2020-12-25 13:10 ` Leonid Vasiliev
2020-12-24 14:14 Leonid Vasiliev
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=c0d7ed81-87d7-9f9a-e9e4-93240e74b41a@tarantool.org \
--to=void@tarantool.org \
--cc=lvasiliev@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v3 2/2] base64: improve decoder performance' \
/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