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 4C14C16ADBAD; Fri, 26 Dec 2025 11:38:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4C14C16ADBAD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1766738308; bh=bVF2lWJyrqHP3fHS7a/UgBkd1bDgZ5OqpelcxqT9zr4=; 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=V10iz/L9r5gk4k0OUv9a2rXIYR49LdJujwssSwBNHdgnMusMi1x5zZSCY1i6MMSlk 5bwx9DA+EWJggRtujdHQzSp2vlKIRtSkPGBA8RhtwtH4zcTkAhyxX1DCQEbffKDs/J 2rE+kBb8z/3HRtPl1aV2jik7c+t5lwEP8QMq2hsM= Received: from send37.i.mail.ru (send37.i.mail.ru [89.221.237.132]) (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 3B77016ADB8E for ; Fri, 26 Dec 2025 11:38:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3B77016ADB8E Received: by exim-smtp-7b4fb89df9-c6mj8 with esmtpa (envelope-from ) id 1vZ3L8-00000000GLY-1ULV; Fri, 26 Dec 2025 11:38:26 +0300 Date: Fri, 26 Dec 2025 11:38:24 +0300 To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Message-ID: References: <5fb7539d5539b29ed416c83a3ec413c5032c99ab.1761301736.git.skaplun@tarantool.org> <33468b50-1c47-4a3f-969d-c43ccacb577a@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <33468b50-1c47-4a3f-969d-c43ccacb577a@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD979975AF0D777FEBD5FB5867E87496E3ED186ABB0F1A32B63182A05F538085040F5FDD0505259982E3DE06ABAFEAF67057B7EAC19EE91382895925BE4019C999495F83A364D46ACBB X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE746D93DAA4671895CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566657B88B02DF8C869A464AE7344017714952016E9899E30F776DA521A92887DFC389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0D9442B0B5983000E8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B652D31B9D28593E51CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE79E9721B410A3B6ED731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5832233208FBCE2915002B1117B3ED696A8CCC0D4E026363D5B6221DB6D7A72AD823CB91A9FED034534781492E4B8EEAD5E90D3DD2A5B7EAFBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE1918E10F71CB4DF9F96AB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D659C3D63C6C74F3AAFD1F516EF96DEF58EAD1CEA2A120E217BCDBEEF815178ABF9A69DDEE9219312D12B8341EE9D5BE9A0A8AA61BE060519149C28A973289374177A6362F32CEC98D718CD93680B12512CF4C41F94D744909CECFA6C6B0C050A61A8CAF69B82BA93681CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVdtTL5f5BIXbra24vcUUZZI= X-Mailru-Sender: 689FA8AB762F7393DDD5FD59B456EAD2D43DCA54B596AB2C782FF385F3421DCD273B36EA317823FEE49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 luajit 36/41] perf: adjust sum-file 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 23.12.25, Sergey Bronnikov wrote: > on execution I got an error: > > ./build/src/luajit: perf/LuaJIT-benches/sum-file.lua:11: attempt to > perform arithmetic on local 'line' (a string value) How do you run the benchmark? | LUA_PATH="perf/utils/?.lua;;" src/luajit perf/LuaJIT-benches/sum-file.lua < perf/LuaJIT-benches/SUMCOL_5000.txt | ------------------------------------------------------------------------------------------------------------- | Benchmark Time CPU Iterations UserCounters... | ------------------------------------------------------------------------------------------------------------- | sum_file 6.21 s 6.20 s 4 items_per_second=3.219M/s The input file contains only numbers. See the comment in the test. > > On 10/24/25 14:00, 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 input for the test is redirected from the generated file > > . This file is the result of concatenation of the > > 5000 times. > > --- > > perf/LuaJIT-benches/sum-file.lua | 29 ++++++++++++++++++++++++----- > > 1 file changed, 24 insertions(+), 5 deletions(-) > > > > diff --git a/perf/LuaJIT-benches/sum-file.lua b/perf/LuaJIT-benches/sum-file.lua > > index c9e618fd..270c1865 100644 > > --- a/perf/LuaJIT-benches/sum-file.lua > > +++ b/perf/LuaJIT-benches/sum-file.lua > > @@ -1,6 +1,25 @@ Added the comment with the short benchmark description, as we discussed offline: =================================================================== diff --git a/perf/LuaJIT-benches/sum-file.lua b/perf/LuaJIT-benches/sum-file.lua index 270c1865..6af2b4a5 100644 --- a/perf/LuaJIT-benches/sum-file.lua +++ b/perf/LuaJIT-benches/sum-file.lua @@ -1,3 +1,7 @@ +-- The benchmark to check the performance of reading lines from +-- stdin and sum the given numbers (the strings converted to +-- numbers by the VM automatically). + local bench = require("bench").new(arg) -- XXX: The input file is generated from by =================================================================== > > +local bench = require("bench").new(arg) > > +-- XXX: The input file is generated from by > > +-- repeating it 5000 times. The contains 1000 lines > > +-- with the total sum of 500. > > +bench:add({ > > + name = "sum_file", > > + payload = function() > > + local sum = 0 > > + for line in io.lines() do > > + sum = sum + line > You obviously cannot sum a string and a number. I can: | luajit -e 'print(1 + "1")' | 2 I haven't changed this line. > > + end -- Best regards, Sergey Kaplun