From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 865FF18407E5; Fri, 2 Jan 2026 18:25:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 865FF18407E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1767367509; bh=yxKbYEzDlnDubdCZKNk1cLlJMiXD0hO0UApdSKvmofo=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=GX87csGnZ1vrIaKQ0M0DkburM8nFbTWuL88Uo8WReYHb72WWN017Y/1VV3b5A6Nwh O6Xu/rDBouTQOQGICe1vZ1S0+uvYcpsqOafg0H/bqHEOEwLZRo0bc2cpmic50s0D3S tDh8zV9jufieiKDMRnYrxcNqCKu16qJCBmgXzeYo= Received: from send60.i.mail.ru (send60.i.mail.ru [89.221.237.155]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 09C8518407E5 for ; Fri, 2 Jan 2026 18:25:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 09C8518407E5 Received: by exim-smtp-7b4fb89df9-qhzgr with esmtpa (envelope-from ) id 1vbh1X-00000000Y2B-3pkF; Fri, 02 Jan 2026 18:25:08 +0300 Content-Type: multipart/alternative; boundary="------------ZI0cG3IJc2daOLR1AQ4F00px" Message-ID: Date: Fri, 2 Jan 2026 18:25:07 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD979975AF0D777FEBD5FB5867E87496E3ED186ABB0F1A32B63182A05F5380850407F85836F18FE91A43DE06ABAFEAF67050B997D5360B02475F1E76487FA78A46FEEE848E17894A636 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE745C0EDBD94D46193EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F28F4AF03526AA8F8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B24EA94990960BE9DD2E070BE324C7D3C4E7D11A41024C7BEDF6B57BC7E64490618DEB871D839B73339E8FC8737B5C224952D31B9D28593E51CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0ECC8AC47CD0EDEFF8941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD269176DF2183F8FC7C046858BEBD2CECBDC7B076A6E789B0E97A8DF7F3B2552694AD5FFEEA1DED7F25D49FD398EE364050F9647ADFADE5905B14AAC223A686B1DECB3661434B16C20ACC84D3B47A649675FE827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B53A69B3AC30C7B9475ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A59A2E07C2599EDDF15002B1117B3ED696130DA8B56C1AA7C2ED71F038FC046993823CB91A9FED034534781492E4B8EEAD9CFA8CFAC159CE19BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE191716CD42B3DD1D34CAB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D6597C6AB8720FF72AEDBC83CF75B708F3D1EE5ECBDCF43DB8F597622D86F87292FE512BAA089AB96998B8341EE9D5BE9A0A1234FF17F9496C66CEB82A62122BC2D12C504F1A410433F28CD93680B12512CF4C41F94D744909CE2512F26BEC029E55448553D2254B8D95CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVTZJppT4ZVHRY7PY+ZNV0no= X-Mailru-Sender: C4F68CFF4024C8867DFDF7C7F2588458DFA064C0A9ABD88FA80142CFDE86685DFD3C0BA536A4815646E2BD4335D42749645D15D82EE4B272BD6E4642A116CA93524AA66B5ACBE6721EF430B9A63E2A504198E0F3ECE9B5443453F38A29522196 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 24/41] perf: adjust recursive-ack in LuaJIT-benches X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------ZI0cG3IJc2daOLR1AQ4F00px Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Sergey! thanks for the patch! LGTM Sergey On 12/26/25 12:17, Sergey Kaplun wrote: > This patch adjusts the aforementioned test to use the benchmark > framework introduced before. The default arguments are adjusted > according to the file. The arguments to the script still > can be provided in the command line run. > --- > perf/LuaJIT-benches/recursive-ack.lua | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > > diff --git a/perf/LuaJIT-benches/recursive-ack.lua b/perf/LuaJIT-benches/recursive-ack.lua > index fad30589..26b4e5c9 100644 > --- a/perf/LuaJIT-benches/recursive-ack.lua > +++ b/perf/LuaJIT-benches/recursive-ack.lua > @@ -1,3 +1,10 @@ > +-- The benchmark to check the performance of recursive calls. > +-- Calculates the Ackermann function. > +-- For the details see: > +--https://mathworld.wolfram.com/AckermannFunction.html > + > +local bench = require("bench").new(arg) > + > local function Ack(m, n) > if m == 0 then return n+1 end > if n == 0 then return Ack(m-1, 1) end > @@ -5,4 +12,17 @@ local function Ack(m, n) > end > > local N = tonumber(arg and arg[1]) or 10 > -io.write("Ack(3,", N ,"): ", Ack(3,N), "\n") > + > +bench:add({ > + name = "recursive_ack", > + -- Sum of calls for the function RA(3, N). > + items = 128 * ((4 ^ N - 1) / 3) - 40 * (2 ^ N - 1) + 3 * N + 15, > + payload = function() > + return Ack(3, N) > + end, > + checker = function(res) > + return res == 2 ^ (N + 3) - 3 > + end, > +}) > + > +bench:run_and_report() --------------ZI0cG3IJc2daOLR1AQ4F00px Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi, Sergey!

thanks for the patch! LGTM

Sergey

On 12/26/25 12:17, Sergey Kaplun wrote:
This patch adjusts the aforementioned test to use the benchmark
framework introduced before. The default arguments are adjusted
according to the <PARAM_x86.txt> file. The arguments to the script still
can be provided in the command line run.
---
 perf/LuaJIT-benches/recursive-ack.lua | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/perf/LuaJIT-benches/recursive-ack.lua b/perf/LuaJIT-benches/recursive-ack.lua
index fad30589..26b4e5c9 100644
--- a/perf/LuaJIT-benches/recursive-ack.lua
+++ b/perf/LuaJIT-benches/recursive-ack.lua
@@ -1,3 +1,10 @@
+-- The benchmark to check the performance of recursive calls.
+-- Calculates the Ackermann function.
+-- For the details see:
+-- https://mathworld.wolfram.com/AckermannFunction.html
+
+local bench = require("bench").new(arg)
+
 local function Ack(m, n)
   if m == 0 then return n+1 end
   if n == 0 then return Ack(m-1, 1) end
@@ -5,4 +12,17 @@ local function Ack(m, n)
 end
 
 local N = tonumber(arg and arg[1]) or 10
-io.write("Ack(3,", N ,"): ", Ack(3,N), "\n")
+
+bench:add({
+  name = "recursive_ack",
+  -- Sum of calls for the function RA(3, N).
+  items = 128 * ((4 ^ N - 1) / 3) - 40 * (2 ^ N - 1) + 3 * N + 15,
+  payload = function()
+    return Ack(3, N)
+  end,
+  checker = function(res)
+    return res == 2 ^ (N + 3) - 3
+  end,
+})
+
+bench:run_and_report()
--------------ZI0cG3IJc2daOLR1AQ4F00px--