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 87F6515F7CDA; Fri, 24 Oct 2025 13:52:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 87F6515F7CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1761303165; bh=ggXEYf4K5QXPFiZNWZGUO3qdobgBihxycnIYEmKZnDw=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=PdpKS2vUpf84p6ZbnEzElhJ1hk/bz7tyrg8LfedOWKozmUB2C4emmyhAL7eDHO9pc fn5/wkZ4nGDjOfX8amEnPT8XK0gwiLe19Dpl8U4RLe8HPU9/zyFQawqwDY0tt3fed+ +8tmKQQ4vbTdsaQrjFaP/ax/BDragZU0srThWTLc= Received: from send105.i.mail.ru (send105.i.mail.ru [89.221.237.200]) (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 CFAC215B1F7B for ; Fri, 24 Oct 2025 13:50:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CFAC215B1F7B Received: by exim-smtp-855f5997bb-88mr2 with esmtpa (envelope-from ) id 1vCFNf-000000006vv-2pA0; Fri, 24 Oct 2025 13:50:48 +0300 To: Sergey Bronnikov Date: Fri, 24 Oct 2025 13:50:08 +0300 Message-ID: <7bed01339e183b7e57bda18130a61748b332c8d0.1761301736.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD9DAB542EDD08389FE3A1DC7F2165CDF75DA90D95266D572EE182A05F53808504045C665DC2A1F8BD13DE06ABAFEAF67059FDA255F655FD31C52E7C6720268728EB242013FB95F71DC X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70CB15FA6C489297DEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F88016AB904663428638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B24D1AEC59E22B7C9C2E070BE324C7D3C4AEF2FEF0D3F0D0B3F6B57BC7E64490618DEB871D839B73339E8FC8737B5C224936DA1BED736F9328CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C045A75973B56231AD8941B15DA834481F9449624AB7ADAF372E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C37CE9EF00282E02DF35872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5B2FA093F003CB9EF5002B1117B3ED69681CD1D7ECB89B9D04869453249F34FA4823CB91A9FED034534781492E4B8EEADEF0AF71940E62277C79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF523ECAFF3025435B906E8B8BF56E2E46ADD2017C72A8A6F4C3941E8F5C4B409B669E50AE970224336EB503EC62A3E87F622E908367401644E2422C6CC32E61FEA56CB286644EF2115F4332CA8FE04980913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVRN2q9QiacRuf4LnXwwHKYc= X-DA7885C5: 9D3DD833EB9E9882F255D290C0D534F92C08E1E6AF88FC364A67B0C629DAED5D71F9D65513E4C3E75B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393DDD5FD59B456EAD2E40A2D8DEB8CE0E811988E4495A63B6ED71434D6905A90B9E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: [Tarantool-patches] [PATCH v1 luajit 04/41] perf: adjust array3d 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 Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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 number of iterations is fixed for this test to avoid OOM errors for the non-GC64 builds. --- perf/LuaJIT-benches/array3d.lua | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/perf/LuaJIT-benches/array3d.lua b/perf/LuaJIT-benches/array3d.lua index c10b09b1..75ab5b01 100644 --- a/perf/LuaJIT-benches/array3d.lua +++ b/perf/LuaJIT-benches/array3d.lua @@ -1,3 +1,4 @@ +local bench = require("bench").new(arg) local function array_set(self, x, y, z, p) assert(x >= 0 and x < self.nx, "x outside PA") @@ -50,10 +51,24 @@ end local dim = tonumber(arg and arg[1]) or 300 -- Array dimension dim^3 local packed = arg and arg[2] == "packed" -- Packed image or flat -local arr = array_new(dim, dim, dim, packed) -for x,y,z in arr:points() do - arr:set(x, y, z, x*x) -end -assert(arr.image[dim^3-1] == (dim-1)^2) +bench:add({ + name = "array3d", + checker = function(arr) + assert(arr.image[dim^3-1] == (dim-1)^2) + return true + end, + payload = function() + local arr = array_new(dim, dim, dim, packed) + for x,y,z in arr:points() do + arr:set(x, y, z, x*x) + end + return arr + end, + items = dim * dim * dim, + -- Limit the number of iterations to avoid OOM errors for + -- non-GC64 builds. + iterations = 5, +}) +bench:run_and_report() -- 2.51.0