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 CD7A216B02F1; Fri, 26 Dec 2025 11:17:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CD7A216B02F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1766737058; bh=lE/Ko27go7rgLpt2/eJsaRC7h9bimh7IRlSn5qkaBoY=; 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=F2+mOP1gZurxC2y6+Re7V6U9ZUaCGLyR8Is7cAjLUVq1PHMibvZLgSGDPV3nceTwq g3PByJfpaH0j8S+aqO49beq24WFP7LWCU04BTm9b/ITxHl1MC5KJplUXGYeMp7/BBT cWGlr4eN6qICObk3KmQfv7dt1pFlACDTYHGly4xo= Received: from send57.i.mail.ru (send57.i.mail.ru [89.221.237.152]) (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 C17D416B02F2 for ; Fri, 26 Dec 2025 11:17:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C17D416B02F2 Received: by exim-smtp-7b4fb89df9-6bbps with esmtpa (envelope-from ) id 1vZ30y-00000000ZtD-3GfQ; Fri, 26 Dec 2025 11:17:37 +0300 Date: Fri, 26 Dec 2025 11:17:34 +0300 To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Message-ID: References: <30a168f9cbe4c5476f274f3e20b56511ca5c3f8d.1761301736.git.skaplun@tarantool.org> <9f45ff89-e948-4549-86e4-c2233ccbfeef@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9f45ff89-e948-4549-86e4-c2233ccbfeef@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD979975AF0D777FEBD74B261A13C49CF1ECC4C442725D8AB97182A05F5380850401BFD578D9C05DEBD3DE06ABAFEAF6705F2B3F1FA88BD0643C3CE4153D521EAFEEC10A369B9726780 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE716FAD50E497B9C14EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566657B88B02DF8C8690E89798A2DD2B25BD2DF50C44735D62415371DA9EC8A425E389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C07E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B64854413538E1713FCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE79E9721B410A3B6ED731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A504A523A1F67821FA5002B1117B3ED69641D5AA41E70C7DCFB74D9144D44E4FCF823CB91A9FED034534781492E4B8EEAD9DB614F8F96CFA30BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE191716CD42B3DD1D34CAB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D659DDF0BA8AC6C4C7ADF7B6959BDBD1DE9FAA6B8EDF891C8A23ADA81117F028D109BEAD30A5AF3BE5CAB8341EE9D5BE9A0A157B1F735D4C153EB737F55268916C7F24AC50730C84CC6C8CD93680B12512CF4C41F94D744909CECFA6C6B0C050A61A8CAF69B82BA93681CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVdtTL5f5BIXbeG2rS5MiOLU= X-DA7885C5: 3174B87EAD336397F255D290C0D534F94C5276E2E36FB0CD9518BCF6ED9C22F78AD9EC5945B43A325B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393DDD5FD59B456EAD2A7DA4F8DDB1105A94F95FAB8B498165E548347BD95E1E9A1E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 luajit 11/41] perf: adjust k-nucleotide 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! Fixed your comments and added the benchmark description. On 17.11.25, Sergey Bronnikov wrote: > Hi, Sergey, > > thanks for the patch! > > 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 benchmark input is given by redirecting the corresponding > > file generated by the `libs/fasta.lua 5e6`. The output > > from the benchmark is redirected to /dev/null. All checks are done by > > the comparison with the precomputed values for the aforementioned file. > > --- > > perf/LuaJIT-benches/k-nucleotide.lua | 93 ++++++++++++++++++++++++---- > > 1 file changed, 82 insertions(+), 11 deletions(-) > > > > diff --git a/perf/LuaJIT-benches/k-nucleotide.lua b/perf/LuaJIT-benches/k-nucleotide.lua > > index 0bfb41be..ae51dae9 100644 > > --- a/perf/LuaJIT-benches/k-nucleotide.lua > > +++ b/perf/LuaJIT-benches/k-nucleotide.lua > > @@ -1,3 +1,4 @@ Also, added the comment with the benchmark description as we discussed offline: =================================================================== diff --git a/perf/LuaJIT-benches/k-nucleotide.lua b/perf/LuaJIT-benches/k-nucleotide.lua index 2a6cbb67..e92429e8 100644 --- a/perf/LuaJIT-benches/k-nucleotide.lua +++ b/perf/LuaJIT-benches/k-nucleotide.lua @@ -1,3 +1,9 @@ +-- The benchmark that checks the performance of hash tables. +-- The program reads the redirected FASTA format file from stdin, +-- extracts DNA sequence THREE, and counts the specific sequences. +-- For the details see: +-- https://benchmarksgame-team.pages.debian.net/benchmarksgame/description/knucleotide.html + local bench = require('bench').new(arg) local function kfrequency(seq, freq, k, frame) =================================================================== > > +local bench = require('bench').new(arg) > > > > local function kfrequency(seq, freq, k, frame) > > local sub = string.sub > > @@ -12,7 +13,8 @@ local function count(seq, frag) > > local k = #frag > > local freq = {} > > for frame=1,k do kfrequency(seq, freq, k, frame) end > > - io.write(freq[frag] or 0, "\t", frag, "\n") > > + return freq[frag] > > + -- io.write(freq[frag] or 0, "\t", frag, "\n") > remove this at all? > > end > > > > local function frequency(seq, k) > > @@ -24,10 +26,13 @@ local function frequency(seq, k) > > local fa, fb = freq[a], freq[b] > > return fa == fb and a > b or fa > fb > > end) > > + local res = {} > > for _,c in ipairs(sfreq) do > > - io.write(string.format("%s %0.3f\n", c, (freq[c]*100)/sum)) > > + -- io.write(string.format("%s %0.3f\n", c, (freq[c]*100)/sum)) > remove? > > + res[c] = freq[c]*100/sum > > end > > - io.write("\n") > > + -- io.write("\n") > > + return res > > end > > > > local function readseq() > > @@ -48,11 +53,77 @@ local function readseq() Removed all output, as you suggested: =================================================================== diff --git a/perf/LuaJIT-benches/k-nucleotide.lua b/perf/LuaJIT-benches/k-nucleotide.lua index ae51dae9..2a6cbb67 100644 --- a/perf/LuaJIT-benches/k-nucleotide.lua +++ b/perf/LuaJIT-benches/k-nucleotide.lua @@ -14,7 +14,6 @@ local function count(seq, frag) local freq = {} for frame=1,k do kfrequency(seq, freq, k, frame) end return freq[frag] - -- io.write(freq[frag] or 0, "\t", frag, "\n") end local function frequency(seq, k) @@ -28,10 +27,8 @@ local function frequency(seq, k) end) local res = {} for _,c in ipairs(sfreq) do - -- io.write(string.format("%s %0.3f\n", c, (freq[c]*100)/sum)) res[c] = freq[c]*100/sum end - -- io.write("\n") return res end =================================================================== -- Best regards, Sergey Kaplun