From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Maxim Kokryashkin <m.kokryashkin@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH luajit] Fix FOLD rule for BUFHDR append. Date: Mon, 20 Nov 2023 14:21:03 +0300 [thread overview] Message-ID: <ZVtBHyuu3f3ByFdR@root> (raw) In-Reply-To: <63wme32y5vhefounhsk2bkebl35lgselb3rcgimt6q3pr3qdgn@cxzb66tgqzzj> Hi, Maxim! Thanks for the review! Fixed your comments and force-pushed the branch. On 17.11.23, Maxim Kokryashkin wrote: > Hi, Sergey! > LGTM, except for a few nits below. > On Tue, Nov 14, 2023 at 06:04:55PM +0300, Sergey Kaplun wrote: <snipped> > > +-- XXX: Use 5 iterations to run variant part of the loop. > Typo: s/variant/the variant/ Fixed. > > +for _ = 1, 5 do > > + result = prefix .. 'a' > > + -- We need a non-constant string to be appended to prevent more > > + -- aggressive optimizations. Use an empty string for > > + -- convenience. Also, use a constant string in the first operand > > + -- in the concatenation operator for more readable `jit.dump` > > + -- output. > > + prefix = 'Lu' .. EMPTY_STR > > +end > > + > > +test:is(result, 'Lua', 'skipped BUFPUT APPEND optimization for PHIs') > The test description is a bit misleading. At first glance it reads like > the `BUFPUT APPEND` itself is skipped. I suggest paraphrasing it like > this: > "BUFPUT APPEND optimization is not applied for PHIs" Fixed, thanks! See the iterative patch below: =================================================================== diff --git a/test/tarantool-tests/lj-791-fold-bufhdr-append.test.lua b/test/tarantool-tests/lj-791-fold-bufhdr-append.test.lua index b2422159..19be91a4 100644 --- a/test/tarantool-tests/lj-791-fold-bufhdr-append.test.lua +++ b/test/tarantool-tests/lj-791-fold-bufhdr-append.test.lua @@ -38,7 +38,7 @@ jit.opt.start('hotloop=1') -- Which appends to buffer instead of reseting, so the resulting -- string contains one more symbol. --- XXX: Use 5 iterations to run variant part of the loop. +-- XXX: Use 5 iterations to run the variant part of the loop. for _ = 1, 5 do result = prefix .. 'a' -- We need a non-constant string to be appended to prevent more @@ -49,6 +49,6 @@ for _ = 1, 5 do prefix = 'Lu' .. EMPTY_STR end -test:is(result, 'Lua', 'skipped BUFPUT APPEND optimization for PHIs') +test:is(result, 'Lua', 'BUFPUT APPEND optimization is not applied for PHIs') test:done(true) =================================================================== Branch is force-pushed. > > + > > +test:done(true) > > -- > > 2.42.0 > > -- Best regards, Sergey Kaplun
next prev parent reply other threads:[~2023-11-20 11:25 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-14 15:04 Sergey Kaplun via Tarantool-patches 2023-11-17 11:06 ` Maxim Kokryashkin via Tarantool-patches 2023-11-20 11:21 ` Sergey Kaplun via Tarantool-patches [this message] 2023-11-24 12:50 ` Sergey Bronnikov via Tarantool-patches 2023-11-27 10:38 ` Sergey Kaplun via Tarantool-patches 2023-12-01 14:22 ` Sergey Bronnikov via Tarantool-patches 2024-01-10 8:51 ` Igor Munkin via Tarantool-patches
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=ZVtBHyuu3f3ByFdR@root \ --to=tarantool-patches@dev.tarantool.org \ --cc=m.kokryashkin@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit] Fix FOLD rule for BUFHDR append.' \ /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