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 2B02115D7902; Mon, 17 Nov 2025 17:19:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2B02115D7902 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1763389154; bh=DQadrr8povQDIeKy4Qr42RJ3f9Kn7CLWuO2R1+kMmGA=; 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=bJRrWUldsH+L7rOh2VfKsAykGewkz9I/64n2v+PaYSe/Fjg6PMGPoXqniH4LH2scg +0fEsmRM9fuo+y6gpyjOrmUoVE8C5UTyJQmupKLgSIkoD0pfZ6bwJX2ecmQnOyiSHw MAsSMHVmbqbvc3NzG+1rqfaEPEPz30n23dDXK134= Received: from send81.i.mail.ru (send81.i.mail.ru [89.221.237.176]) (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 CD15615D1129 for ; Mon, 17 Nov 2025 17:19:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CD15615D1129 Received: by exim-smtp-88cf54d45-5xs87 with esmtpa (envelope-from ) id 1vL04V-00000000FPD-3rVU; Mon, 17 Nov 2025 17:19:12 +0300 Content-Type: multipart/alternative; boundary="------------xLk81ECzaQBuXNu0BMsKh99p" Message-ID: <4e47b061-e62e-4f77-8856-b23fd5bfa6b5@tarantool.org> Date: Mon, 17 Nov 2025 17:19:11 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: <1a8a820fc79739ef091e7fbd3f127313f12785a1.1761301736.git.skaplun@tarantool.org> In-Reply-To: <1a8a820fc79739ef091e7fbd3f127313f12785a1.1761301736.git.skaplun@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9231027FDF5B453B6F5C913D01F884A7988CE72241B5CB818182A05F5380850400E0C89881F200FDB3DE06ABAFEAF6705102D56877113A93383E3C9BD2A428B32239A53BAF60AA5ED X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7544B1CCE26E01C74EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637ECAF4C2CEE0D0B2F8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2846E120F87CB8F9B2E070BE324C7D3C4C5A75E4DBE2FA3E3F6B57BC7E64490618DEB871D839B73339E8FC8737B5C2249D082881546D93491CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0A3E989B1926288338941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD269176DF2183F8FC7C0CAB4775CB929E3BB7B076A6E789B0E97A8DF7F3B2552694AD5FFEEA1DED7F25D49FD398EE364050F9647ADFADE5905B1F41620B44FB51B7DB3661434B16C20ACC84D3B47A649675FE827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BC6A536F79815AD9275ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5A8767069921A78635002B1117B3ED6965BFA87A7A9D946AB92212597CCBD6D77823CB91A9FED034534781492E4B8EEADEEA082C9A12FE455BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF60249A1C1B68D55A39A19AFE8D56000CC450244829E1D73C862658D319C72DB47E72D8710CBEBF0EDD6EA89E5C47541B46079EF0B20B982027F69B924A2B419ABD048C62BE28A961111DC66A97D0BFE2913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVfFX+FmbwDW172PtJfo3qvg= X-Mailru-Sender: 520A125C2F17F0B1A9638AD358559B594B02EBE1EA1CC7F63DE06ABAFEAF6705102D56877113A933B7CBEF92542CD7C8795FA72BAB74744FC77752E0C033A69EA16A481184E8BB1C9B38E6EA4F046BE03A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 luajit 34/41] perf: adjust series 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. --------------xLk81ECzaQBuXNu0BMsKh99p Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Sergey, thanks for the patch! See comments below. Sergey On 10/24/25 14:00, 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/series.lua | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) > > diff --git a/perf/LuaJIT-benches/series.lua b/perf/LuaJIT-benches/series.lua > index f766cb32..3dc970c5 100644 > --- a/perf/LuaJIT-benches/series.lua > +++ b/perf/LuaJIT-benches/series.lua > @@ -1,3 +1,4 @@ > +local bench = require("bench").new(arg) > > local function integrate(x0, x1, nsteps, omegan, f) > local x, dx = x0, (x1-x0)/nsteps > @@ -26,9 +27,16 @@ local function series(n) > end > > local n = tonumber(arg and arg[1]) or 10000 > -local tm = os.clock() > -local t = series(n) > -tm = os.clock() - tm > -assert(math.abs(t[1]-2.87295) < 0.00001) > -io.write(string.format("size %d, %.2f s, %.1f iterations/s\n", > - n, tm, (2*n-1)/tm)) debug print was lost, is it intentional? > + > +bench:add({ > + name = "series", > + checker = function(res) > + return math.abs(res[1]-2.87295) < 0.00001 add more whitespaces > + end, > + payload = function() > + return series(n) > + end, > + items = 2 * n - 1, > +}) > + > +bench:run_and_report() --------------xLk81ECzaQBuXNu0BMsKh99p Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi, Sergey,

thanks for the patch! See comments below.

Sergey

On 10/24/25 14:00, 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/series.lua | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/perf/LuaJIT-benches/series.lua b/perf/LuaJIT-benches/series.lua
index f766cb32..3dc970c5 100644
--- a/perf/LuaJIT-benches/series.lua
+++ b/perf/LuaJIT-benches/series.lua
@@ -1,3 +1,4 @@
+local bench = require("bench").new(arg)
 
 local function integrate(x0, x1, nsteps, omegan, f)
   local x, dx = x0, (x1-x0)/nsteps
@@ -26,9 +27,16 @@ local function series(n)
 end
 
 local n = tonumber(arg and arg[1]) or 10000
-local tm = os.clock()
-local t = series(n)
-tm = os.clock() - tm
-assert(math.abs(t[1]-2.87295) < 0.00001)
-io.write(string.format("size %d, %.2f s, %.1f iterations/s\n",
-                       n, tm, (2*n-1)/tm))
debug print was lost, is it intentional?
+
+bench:add({
+  name = "series",
+  checker = function(res)
+    return math.abs(res[1]-2.87295) < 0.00001
add more whitespaces
+  end,
+  payload = function()
+    return series(n)
+  end,
+  items = 2 * n - 1,
+})
+
+bench:run_and_report()
--------------xLk81ECzaQBuXNu0BMsKh99p--