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 9A5A4192319D; Tue, 13 Jan 2026 17:46:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9A5A4192319D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1768315602; bh=bt1kUlx60OQuNh/6LxUsoCB7UhGnadMkJnLuhSYukpc=; 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=Gn6mb1iZnXIm3SB3fyG3e97xkmwYzxUWghHvAcFv0r8epiqLQ2cKLOEa9RJVF4s6X EREOdcDnesTz9tusVdvBLda13h2z6B6FR8+FG8UGAKf9XTEEfemJ9B3lkay6ePHKCt K4Etv/bMSpFU5iNiqqzOIZLhtIO6w+AhRp2qK7r8= Received: from send80.i.mail.ru (send80.i.mail.ru [89.221.237.175]) (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 A513170370 for ; Tue, 13 Jan 2026 17:46:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A513170370 Received: by exim-smtp-7b4fb89df9-qxm5w with esmtpa (envelope-from ) id 1vfffL-00000000UJ3-1t0F; Tue, 13 Jan 2026 17:46:39 +0300 Content-Type: multipart/alternative; boundary="------------3bF76iqJ5Dwe4AriosoKZ0Wq" Message-ID: <2efd55f7-b3ec-45ac-bcda-4ea94ecb7ff1@tarantool.org> Date: Tue, 13 Jan 2026 17:45:51 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: <4ab0f949bd2c130a977aa07b4fd08eb845f1442d.1766738771.git.skaplun@tarantool.org> In-Reply-To: <4ab0f949bd2c130a977aa07b4fd08eb845f1442d.1766738771.git.skaplun@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9FCF5E9ABA5FD49010C5F267E881DF80F4E43FBE6C03AC2E7182A05F5380850404C228DA9ACA6FE27279AB347DD34B6B73DE06ABAFEAF67058B0B43620C2F9F7922EBA7B9F185D78F7B12D36DB06ABBA0 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7FBB2043146276655EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637ECAF4C2CEE0D0B2F8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B21ABAD37F8C2D01AA2E070BE324C7D3C455E1900B5FCD9837F6B57BC7E64490618DEB871D839B73339E8FC8737B5C2249957A4DEDD2346B42CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0ECC8AC47CD0EDEFF8941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD269176DF2183F8FC7C0CAB4775CB929E3BB7B076A6E789B0E97A8DF7F3B2552694AD5FFEEA1DED7F25D49FD398EE364050F9647ADFADE5905B1F41620B44FB51B7DB3661434B16C20ACC84D3B47A649675FE827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B9C5AF73B5E338C8A75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5D52A4CF7BDB40DDA5002B1117B3ED69622417BE8CCA3CE3FED71F038FC046993823CB91A9FED034534781492E4B8EEAD47A3109F1ACFD409BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE1918E10F71CB4DF9F96AB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D65949BFA96F8F9C965729CEBC3A3F897AB456CC163AB8B551F3951E84C75942FD26BB66F44B6304EC40B8341EE9D5BE9A0A183035EE56009C10391D4E9E3F702D3112B8A98D702C09738CD93680B12512CF4C41F94D744909CE2512F26BEC029E55448553D2254B8D95CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVVt0N+pdRHOZ3TlHibVJODY= X-Mailru-Sender: 811C44EDE0507D1FF7A5115BD94F8393209382018B8CC186582B80AE0CC3240953BEF3CA83CA5FC158E7C7A7B5E04EBD645D15D82EE4B272BD6E4642A116CA93524AA66B5ACBE6721EF430B9A63E2A504198E0F3ECE9B5443453F38A29522196 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 36/41] perf: adjust sum-file 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. --------------3bF76iqJ5Dwe4AriosoKZ0Wq 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:18, 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. > > The input for the test is redirected from the generated file > . This file is the result of concatenation of the > 5000 times. > --- > perf/LuaJIT-benches/sum-file.lua | 33 +++++++++++++++++++++++++++----- > 1 file changed, 28 insertions(+), 5 deletions(-) > > diff --git a/perf/LuaJIT-benches/sum-file.lua b/perf/LuaJIT-benches/sum-file.lua > index c9e618fd..6af2b4a5 100644 > --- a/perf/LuaJIT-benches/sum-file.lua > +++ b/perf/LuaJIT-benches/sum-file.lua > @@ -1,6 +1,29 @@ > +-- The benchmark to check the performance of reading lines from > +-- stdin and sum the given numbers (the strings converted to > +-- numbers by the VM automatically). > > -local sum = 0 > -for line in io.lines() do > - sum = sum + line > -end > -io.write(sum, "\n") > +local bench = require("bench").new(arg) > + > +-- XXX: The input file is generated from by > +-- repeating it 5000 times. The contains 1000 lines > +-- with the total sum of 500. > +bench:add({ > + name = "sum_file", > + payload = function() > + local sum = 0 > + for line in io.lines() do > + sum = sum + line > + end > + -- Allow several iterations. > +io.stdin:seek("set", 0) > + return sum > + end, > + checker = function(res) > + -- Precomputed result. > + return res == 2500000 > + end, > + -- Fixed size of the file. > + items = 5e6, > +}) > + > +bench:run_and_report() --------------3bF76iqJ5Dwe4AriosoKZ0Wq Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi, Sergey!

thanks for the patch! LGTM

Sergey

On 12/26/25 12:18, 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.

The input for the test is redirected from the generated file
<SUMCOL_5000.txt>. This file is the result of concatenation of the
<SUMCOL_1.txt> 5000 times.
---
 perf/LuaJIT-benches/sum-file.lua | 33 +++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)

diff --git a/perf/LuaJIT-benches/sum-file.lua b/perf/LuaJIT-benches/sum-file.lua
index c9e618fd..6af2b4a5 100644
--- a/perf/LuaJIT-benches/sum-file.lua
+++ b/perf/LuaJIT-benches/sum-file.lua
@@ -1,6 +1,29 @@
+-- The benchmark to check the performance of reading lines from
+-- stdin and sum the given numbers (the strings converted to
+-- numbers by the VM automatically).
 
-local sum = 0
-for line in io.lines() do
-  sum = sum + line
-end
-io.write(sum, "\n")
+local bench = require("bench").new(arg)
+
+-- XXX: The input file is generated from <SUMCOL_1.txt> by
+-- repeating it 5000 times. The <SUMCOL_1.txt> contains 1000 lines
+-- with the total sum of 500.
+bench:add({
+  name = "sum_file",
+  payload = function()
+    local sum = 0
+    for line in io.lines() do
+      sum = sum + line
+    end
+    -- Allow several iterations.
+    io.stdin:seek("set", 0)
+    return sum
+  end,
+  checker = function(res)
+    -- Precomputed result.
+    return res == 2500000
+  end,
+  -- Fixed size of the file.
+  items = 5e6,
+})
+
+bench:run_and_report()
--------------3bF76iqJ5Dwe4AriosoKZ0Wq--