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 15F3416C65B2; Fri, 26 Dec 2025 12:20:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 15F3416C65B2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1766740822; bh=dj00iM/ovuKiHNzJhbL/9p4KivvjXQnymFHay1arWW0=; 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=xIHMw93NV5In5bFD4kUM71aw1UWRqLvOfJzhb43iSHLHQA76sbk0dju+6ioVGdM6T uFyyYnzqLFrz5VjxFfXRBOZpb3RVyo04VhxA12OMRA2+w62FjbV7+6nVkusC7WuQtq Qx1aERgrvPTfJOOyhKFpwhp66/+zkEnVXigXfWcI= Received: from send82.i.mail.ru (send82.i.mail.ru [89.221.237.177]) (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 6874916ADBAB for ; Fri, 26 Dec 2025 12:18:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6874916ADBAB Received: by exim-smtp-7b4fb89df9-lft7n with esmtpa (envelope-from ) id 1vZ3xm-000000008Cp-1nCi; Fri, 26 Dec 2025 12:18:22 +0300 To: Sergey Bronnikov Date: Fri, 26 Dec 2025 12:17:35 +0300 Message-ID: <137994c89849daa406bc9140cf4d96f5b632e70d.1766738771.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD979975AF0D777FEBDB5A0B7D2FFA411B6E217FB390AD6DF18182A05F538085040862462E725C271063DE06ABAFEAF6705F54399C373B2E5B5B4FA2C6BBBE99EF9E230A8568C332C38 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7922E451CE6E839B1EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F28F4AF03526AA8F8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B29DDA9188C3EBCEA32E070BE324C7D3C448E16390D14B4EC1F6B57BC7E64490618DEB871D839B73339E8FC8737B5C224952D31B9D28593E51CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0B27420F9988F54058941B15DA834481F9449624AB7ADAF372E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3C9EEE74C166EF7BC35872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5D754E2A001CABB9C5002B1117B3ED696C336E81061A5C729B2920F75BA9A967F823CB91A9FED034534781492E4B8EEAD2739D626790C8313C79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE191716CD42B3DD1D34CAB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D659BF05A924D477FE9910267BA32D0FE68A61289761AF9835434F508C5A3B0A91A703DF49A0B6C7F7F2B8341EE9D5BE9A0A2AFB4FDB82B28A2605D8439B09F6DFF0143A0238F198117E6536EB022892E5344C41F94D744909CECFA6C6B0C050A61A8CAF69B82BA93681CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVdtTL5f5BIXbWMU/rFAZNxI= X-Mailru-Sender: 689FA8AB762F7393DDD5FD59B456EAD2B5D0EF74299EAE3A8700636FE984EBB83568380ACD40C2EBE49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 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 | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/perf/LuaJIT-benches/array3d.lua b/perf/LuaJIT-benches/array3d.lua index c10b09b1..80562706 100644 --- a/perf/LuaJIT-benches/array3d.lua +++ b/perf/LuaJIT-benches/array3d.lua @@ -1,3 +1,8 @@ +-- The benchmark to measure simple operations on array-like data +-- structures. +-- Here, a 3D array is represented as a contiguous 1D array. + +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 +55,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 = 4, +}) +bench:run_and_report() -- 2.52.0