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 65E6816AE247; Fri, 26 Dec 2025 11:28:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 65E6816AE247 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1766737682; bh=4Huo71yjUNbU0JYWastGAEud88lwmkGY1xAD+DjLU4w=; 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=Rmkh+yXjsd3AxI8LtulKAfz3jlLyFg76qKmu4uciHR028HuTmvedM85asEgC/RMxu 83yZRdXWUHmnjXwsPuD8CgoS7fi4DPIr4t87THqECu613xrqhj+yWACqQ8dAK/Ah/p LlsDkY+bT8MvSpVDDf2N1v7UhE94qTyJ1MtvLUaI= Received: from send126.i.mail.ru (send126.i.mail.ru [89.221.237.221]) (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 DF50516AE247 for ; Fri, 26 Dec 2025 11:28:01 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DF50516AE247 Received: by exim-smtp-7b4fb89df9-l6s2p with esmtpa (envelope-from ) id 1vZ3B2-00000000BgO-3RTs; Fri, 26 Dec 2025 11:28:01 +0300 Date: Fri, 26 Dec 2025 11:27:58 +0300 To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Message-ID: References: <095b569a-72d0-4437-a6a6-d15e68ae71c6@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <095b569a-72d0-4437-a6a6-d15e68ae71c6@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD979975AF0D777FEBD136B1DE29D0A14187F3E33C5CB109B4B182A05F538085040F9FF0E2123128A833DE06ABAFEAF6705427532279F36A381C3CE4153D521EAFEE562466E44F69C12 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE74FC7AD0AD96C1577EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566657B88B02DF8C869E059F07EB39D5FBC915D318B3E9DA6D94DCA8E2BB335DAB1389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C07E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B64854413538E1713FCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE79E9721B410A3B6ED731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5556D31F1823230E05002B1117B3ED69608BACDD3745BED04B91D2EB2DEE3878C823CB91A9FED034534781492E4B8EEADB73CFAAED92B6E13BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE191716CD42B3DD1D34CAB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D6593466A9DCEDD018BDF0ECE10D563053C26928C975199A5661AD1F6934604498387561BAEC9BDC3326B8341EE9D5BE9A0A53986309D39EBFB04B47B2A62B22FB99B4B47CA4AAFAAF4D8CD93680B12512CF4C41F94D744909CECFA6C6B0C050A61A8CAF69B82BA93681CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVdtTL5f5BIXbzurQ5n467hs= X-Mailru-Sender: 689FA8AB762F7393DDD5FD59B456EAD29C075E03F09AB83BBCE14B94FCB6F796F9DAA618A752DB8CE49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 luajit 22/41] perf: adjust pidigits-nogmp 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 Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the review. Please, consider my answers below. On 17.11.25, Sergey Bronnikov wrote: > Hi, Sergey, > > thanks for the patch! See my comments. > > Sergey > > On 10/24/25 13:50, 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 output is redirected to /dev/null. The check is skipped since it is > > very inconvenient to store the huge file in the repository with the > > reference value. > > --- > > perf/LuaJIT-benches/pidigits-nogmp.lua | 49 ++++++++++++++++++-------- > > 1 file changed, 35 insertions(+), 14 deletions(-) > > > > diff --git a/perf/LuaJIT-benches/pidigits-nogmp.lua b/perf/LuaJIT-benches/pidigits-nogmp.lua > > index 63a1cb0e..e96b3e45 100644 > > --- a/perf/LuaJIT-benches/pidigits-nogmp.lua > > +++ b/perf/LuaJIT-benches/pidigits-nogmp.lua > > @@ -1,3 +1,4 @@ Added the comment with the short benchmark description, as we discussed offline: =================================================================== diff --git a/perf/LuaJIT-benches/pidigits-nogmp.lua b/perf/LuaJIT-benches/pidigits-nogmp.lua index 3581a55a..cdfa7fcb 100644 --- a/perf/LuaJIT-benches/pidigits-nogmp.lua +++ b/perf/LuaJIT-benches/pidigits-nogmp.lua @@ -1,3 +1,10 @@ +-- The benchmark to check the performance of arithmetic operations +-- array accesses simulating the multi-precision number +-- operations and the streaming output to the stdout. This +-- benchmark calculates the first numbers of Pi. +-- For the details see: +-- https://benchmarksgame-team.pages.debian.net/benchmarksgame/description/pidigits.html + local bench = require("bench").new(arg) -- Start of dynamically compiled chunk. =================================================================== > > +local bench = require("bench").new(arg) > > > > -- Start of dynamically compiled chunk. > > local chunk = [=[ > > @@ -80,21 +81,41 @@ end) > > > > ]=] -- End of dynamically compiled chunk. > > > > -local N = tonumber(arg and arg[1]) or 27 > > +local N = tonumber(arg and arg[1]) or 5000 > Why 5000 by default? It is the default for x86 arch. I've taken the values from PARAMS_x86, since this is the most important architecture for the Tarantool, see the commit message. > > local RADIX = N < 6500 and 2^36 or 2^32 -- Avoid overflow. > > > > --- Print remaining digits (if any). > > -local n10 = N % 10 > > -if n10 ~= 0 then > > - for i=1,n10 do io.write(pidigit()) end > add more whitespaces, here and below Fixed: =================================================================== diff --git a/perf/LuaJIT-benches/pidigits-nogmp.lua b/perf/LuaJIT-benches/pidigits-nogmp.lua index e96b3e45..3581a55a 100644 --- a/perf/LuaJIT-benches/pidigits-nogmp.lua +++ b/perf/LuaJIT-benches/pidigits-nogmp.lua @@ -100,16 +100,16 @@ bench:add({ local pidigit = loadstring(string.gsub(chunk, "RADIX", tostring(RADIX)))() -- Print lines with 10 digits. - for i=10,N,10 do - for j=1,10 do io.write(pidigit()) end + for i = 10, N, 10 do + for _ = 1, 10 do io.write(pidigit()) end io.write("\t:", i, "\n") end -- Print remaining digits (if any). local n10 = N % 10 if n10 ~= 0 then - for i=1,n10 do io.write(pidigit()) end - io.write(string.rep(" ", 10-n10), "\t:", N, "\n") + for _ = 1, n10 do io.write(pidigit()) end + io.write(string.rep(" ", 10 - n10), "\t:", N, "\n") end end, teardown = function() =================================================================== > > - io.write(string.rep(" ", 10-n10), "\t:", N, "\n") > > -end -- Best regards, Sergey Kaplun