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 CE8E716F8491; Sat, 3 Jan 2026 09:38:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CE8E716F8491 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1767422299; bh=J4rshPwa2M9fd7HhQE3xNWzmMO33pRY4W5HzWJEguBI=; 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=gkJe24XizhRtLMJh1SZefPyx2mGykvYLgOU0UaCcoULY87duNVPdbyoNI2ij0Mc9J 7UWGpGjYsRTWcdgC672K1IeJrP/dsSunpMFnfF9iU4D7pgKAXsvpWUv3WpRI9ltaBy kOMIZpoXRhsDCWrZW1s6cq5FA55cVYm3eNJqnIBg= Received: from send195.i.mail.ru (send195.i.mail.ru [95.163.59.34]) (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 6E64416F848F for ; Sat, 3 Jan 2026 09:38:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6E64416F848F Received: by exim-smtp-7b4fb89df9-4rqsk with esmtpa (envelope-from ) id 1vbvHF-000000007Ex-2T42; Sat, 03 Jan 2026 09:38:17 +0300 Date: Sat, 3 Jan 2026 09:38:21 +0300 To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Message-ID: References: <27c8ab14bd988b3a60f9204502b7e0edb14c7480.1766738771.git.skaplun@tarantool.org> <67655dd2-51ef-4d5c-ad10-31b090c1dd46@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67655dd2-51ef-4d5c-ad10-31b090c1dd46@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD979975AF0D777FEBD74B261A13C49CF1ECC4C442725D8AB97182A05F538085040779FC64905AA6A8D3DE06ABAFEAF6705D3A4B8D2AD9ACE4155F7E15FAFEAFD3A67236096E73D0E14 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70D278D70F8433719EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566D1B0EEF93386A5FD5328805AEC961C7FAA908E7FED8342E5BA3108A545D572F1389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C07E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B64854413538E1713FCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7588D3C263EAE74EA731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5084D9E71991890705002B1117B3ED6960E9C73219FCE944CE99897350C7C491E823CB91A9FED034534781492E4B8EEAD0AA277257C6A5E3DBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE1918E10F71CB4DF9F96AB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D6593AAD1BADAC0E68B6F5671BD526B66DDC5172A3FCECA686D3EC369D42F71F0DA8FA4852CF0DF5E184B8341EE9D5BE9A0AA53563C3897CE048A813762A616FDFB7BC68F279CF463FBE8CD93680B12512CF4C41F94D744909CECFA6C6B0C050A61A8CAF69B82BA93681CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVTZJppT4ZVHRG9pl8XB57wE= X-Mailru-Sender: 689FA8AB762F7393DDD5FD59B456EAD2A68B4545D00E583677429458D689EB318421F9B4B1630D09E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 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" Hello, Sergey! Please consider my answers below. On 02.01.26, Sergey Bronnikov wrote: > Hello, Sergey, > > please see my comments. > > Sergey > > On 12/26/25 12:17, 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 | 96 ++++++++++++++++++++++++---- > > 1 file changed, 85 insertions(+), 11 deletions(-) > > > > diff --git a/perf/LuaJIT-benches/k-nucleotide.lua b/perf/LuaJIT-benches/k-nucleotide.lua > > index 0bfb41be..e92429e8 100644 > > --- a/perf/LuaJIT-benches/k-nucleotide.lua > > +++ b/perf/LuaJIT-benches/k-nucleotide.lua > > @@ -1,3 +1,10 @@ > > +-- 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 > > @@ -24,10 +31,11 @@ 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)) > > + res[c] = freq[c]*100/sum > add more whitespaces please Added: =================================================================== diff --git a/perf/LuaJIT-benches/k-nucleotide.lua b/perf/LuaJIT-benches/k-nucleotide.lua index e92429e8..d0faa45d 100644 --- a/perf/LuaJIT-benches/k-nucleotide.lua +++ b/perf/LuaJIT-benches/k-nucleotide.lua @@ -33,7 +33,7 @@ local function frequency(seq, k) end) local res = {} for _,c in ipairs(sfreq) do - res[c] = freq[c]*100/sum + res[c] = freq[c] * 100 / sum end return res end =================================================================== > > end > > - io.write("\n") > > + return res > > end > > > > local function readseq() > > @@ -48,11 +56,77 @@ local function readseq() > > return string.upper(table.concat(lines, "", 1, ln)) > > end > > > > -local seq = readseq() > > -frequency(seq, 1) > > -frequency(seq, 2) > > -count(seq, "GGT") > > -count(seq, "GGTA") > > -count(seq, "GGTATT") > > -count(seq, "GGTATTTTAATT") > > -count(seq, "GGTATTTTAATTTATAGT") > > +local function check_freq(res, expected) > > + for k,v in pairs(expected) do > > + assert(string.format("%0.3f", res[k]) == v, > > + "Incorrect frequency for fragment " .. k) > > + end > > +end > > + > > +-- The input is generated by `fasta.lua 5e6'. The check function > > +-- is corresponding. > > +local N = 5e6 > > +-- See for the details. > > I don't know why, but microbench cannot finish on my machine. And > according to usage > > and implementation it is not expected any input or option. It expects the FASTA_5000000 file as an redirected input from stdin. -- Best regards, Sergey Kaplun