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 CE86A16AE246; Fri, 26 Dec 2025 11:32:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CE86A16AE246 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1766737935; bh=BNiJq3pvxz5gNAILDdEaspTvrbkZqvbI+RCD1/pNRok=; 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=vKeyW0hN0uu++vhsD2URx56fR/lo6pWkUuYi7uhZutGNaGIcQ3FMgArT92aEV5BSh xtK4OAXclEn4xtxVH844Znt0pcLADvtRO9ZlAOuXfLIndSWsUpjYHZbMVA1KUFAva3 GBxC0rGqwOASCchLQKsyqgaIVzTaPeeWo0PJEX9M= Received: from send175.i.mail.ru (send175.i.mail.ru [95.163.59.14]) (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 E7C6116AE246 for ; Fri, 26 Dec 2025 11:32:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E7C6116AE246 Received: by exim-smtp-7b4fb89df9-dnn8f with esmtpa (envelope-from ) id 1vZ3F5-00000000HCw-3bju; Fri, 26 Dec 2025 11:32:12 +0300 Date: Fri, 26 Dec 2025 11:32:09 +0300 To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Message-ID: References: <617f81c0-e3bb-4ba1-89db-185b7e74fcee@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <617f81c0-e3bb-4ba1-89db-185b7e74fcee@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD979975AF0D777FEBD390EF5E93CD1F77387498C0EC589AA68182A05F5380850404BC571D847DDF04B3DE06ABAFEAF6705548CC7DE60880098C3CE4153D521EAFEDABA3F7B65B49C8A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE72424932217190DC2EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566657B88B02DF8C8696FC510C3211678239D2441CA0DDA2BA426F6DEF6E4EC1650389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0D9442B0B5983000E8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B636DA1BED736F9328CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE76D0F27F7E6A6C418731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A508DDB2DD812EC36E5002B1117B3ED696770F3398792E54C7C81EEE05487B0209823CB91A9FED034534781492E4B8EEADAE4FDBF11360AC9BBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE191716CD42B3DD1D34CAB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D65999F14F44C88074D4C86ABDA87B85787EE9B6C46F100C2DF54F65A634050DBF1B24911D94AACF3280B8341EE9D5BE9A0A2EFE7307ACD692459420098D42F884FA73990C716CEA9E648CD93680B12512CF4C41F94D744909CECFA6C6B0C050A61A8CAF69B82BA93681CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVdtTL5f5BIXbpVsSG1DBNYI= X-DA7885C5: 0959DA1D047CF347F255D290C0D534F9721ABFA832CCBED1D5BF58F8B5862B41F6195F87A993FF0C5B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393DDD5FD59B456EAD276946CAA2490FA0038EDCD602E56303E7238B2365E41FD3EE49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 luajit 27/41] perf: adjust scimark-2010-12-20 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 time for each subsequent benchmark is increased up to 4 seconds, > > accoring the defaults in the "bench" framework. The main difference > > between this test and others that will be added in next commits is > > the usage of FFI arrays instead of plain Lua tables. > > --- > > perf/LuaJIT-benches/scimark-2010-12-20.lua | 93 +++++++++++++--------- > > 1 file changed, 54 insertions(+), 39 deletions(-) > > > > diff --git a/perf/LuaJIT-benches/scimark-2010-12-20.lua b/perf/LuaJIT-benches/scimark-2010-12-20.lua > > index 353acb7c..3fb627fa 100644 > > --- a/perf/LuaJIT-benches/scimark-2010-12-20.lua > > +++ b/perf/LuaJIT-benches/scimark-2010-12-20.lua > > @@ -9,25 +9,26 @@ > > local SCIMARK_VERSION = "2010-12-10" > > local SCIMARK_COPYRIGHT = "Copyright (C) 2006-2010 Mike Pall" > > > > -local MIN_TIME = 2.0 > > +local bench = require("bench").new(arg) > > + > > local RANDOM_SEED = 101009 -- Must be odd. > > local SIZE_SELECT = "small" > > > > local benchmarks = { > > "FFT", "SOR", "MC", "SPARSE", "LU", > > small = { > > - FFT = { 1024 }, > > - SOR = { 100 }, > > - MC = { }, > > - SPARSE = { 1000, 5000 }, > > - LU = { 100 }, > > + FFT = { params = { 1024 }, cycles = 50000, }, > > + SOR = { params = { 100 }, cycles = 50000, }, > > + MC = { params = { }, cycles = 15e7, }, > > + SPARSE = { params = { 1000, 5000 }, cycles = 15e4, }, > > + LU = { params = { 100 }, cycles = 5000, }, > > }, > > large = { > > - FFT = { 1048576 }, > > - SOR = { 1000 }, > > - MC = { }, > > - SPARSE = { 100000, 1000000 }, > > - LU = { 1000 }, > > + FFT = { params = { 1048576 }, cycles = 25, }, > > + SOR = { params = { 1000 }, cycles = 500, }, > > + MC = { params = { }, cycles = 15e7, }, > > + SPARSE = { params = { 100000, 1000000 }, cycles = 1500, }, > > + LU = { params = { 1000 }, cycles = 50, }, > > }, > > } > please add a comment about chosen parameters 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. Others parameters are adjusted by comparing with the non-ffi version of the benchmark. > > > > @@ -342,48 +343,51 @@ local function fmtparams(p1, p2) > > return "" > > end > > > > -local function measure(min_time, name, ...) > > +local function measure(name, cycles, ...) > > array_init() > > rand_init(RANDOM_SEED) > > local run = benchmarks[name](...) > > - local cycles = 1 > > - repeat > > - local tm = clock() > > - local flops = run(cycles, ...) > > - tm = clock() - tm > > - if tm >= min_time then > > - local res = flops / tm * 1.0e-6 > > - local p1, p2 = ... > > - printf("%-7s %8.2f %s\n", name, res, fmtparams(...)) > > - return res > > - end > > - cycles = cycles * 2 > > - until false > > + local flops = run(cycles, ...) > > + return flops > > end > > > > -printf("Lua SciMark %s based on SciMark 2.0a. %s.\n\n", > > - SCIMARK_VERSION, SCIMARK_COPYRIGHT) > > +-- printf("Lua SciMark %s based on SciMark 2.0a. %s.\n\n", > > +-- SCIMARK_VERSION, SCIMARK_COPYRIGHT) > > > > I propose to move this to a comment with test description. Removed this line. The top of the file already contains the description: =================================================================== diff --git a/perf/LuaJIT-benches/scimark-2010-12-20.lua b/perf/LuaJIT-benches/scimark-2010-12-20.lua index 3fb627fa..4b80ffe2 100644 --- a/perf/LuaJIT-benches/scimark-2010-12-20.lua +++ b/perf/LuaJIT-benches/scimark-2010-12-20.lua @@ -351,9 +351,6 @@ local function measure(name, cycles, ...) return flops end --- printf("Lua SciMark %s based on SciMark 2.0a. %s.\n\n", --- SCIMARK_VERSION, SCIMARK_COPYRIGHT) - while arg and arg[1] do local a = table.remove(arg, 1) if a == "noffi" then =================================================================== > > Something like: > > The test runs the Lua version of SciMark 2.0a, which is a benchmark for > scientific and numerical computing developed by programmers at the NIST > (National Institute of Standards and Technology). This test is made up > of Fast Foruier Transform, Jacobi Successive Over-relaxation, Monte > Carlo, Sparse Matrix Multiply, and dense LU matrix factorization benchmarks. > > plus description of available test-specific options (noffi, small, etc) > or just This options are kinda obvious for the usage. I suppose there is no need to document them somehow, since the benchmark is run in the one default configuration in the CI. > > a command-line that will show usage: ./scimark-2010-12-20.lua help It already has the following ouptut: | Usage: scimark [noffi] [small|large] [BENCH params...] | | BENCH small large | --------------------------------------- | FFT [1024] [1048576] | SOR [100] [1000] | MC | SPARSE [1000, 5000] [100000, 1000000] | LU [100] [1000] > > > while arg and arg[1] do -- Best regards, Sergey Kaplun