<!DOCTYPE html>
<html data-lt-installed="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="padding-bottom: 1px;">
<p>Hi, Sergey,</p>
<p>thanks for the patch! See comments below.</p>
<p>Sergey</p>
<div class="moz-cite-prefix">On 10/24/25 14:00, Sergey Kaplun wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1a8a820fc79739ef091e7fbd3f127313f12785a1.1761301736.git.skaplun@tarantool.org">
<pre wrap="" class="moz-quote-pre">This patch adjusts the aforementioned test to use the benchmark
framework introduced before. The default arguments are adjusted
according to the <PARAM_x86.txt> file. The arguments to the script still
can be provided in the command line run.
---
perf/LuaJIT-benches/series.lua | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/perf/LuaJIT-benches/series.lua b/perf/LuaJIT-benches/series.lua
index f766cb32..3dc970c5 100644
--- a/perf/LuaJIT-benches/series.lua
+++ b/perf/LuaJIT-benches/series.lua
@@ -1,3 +1,4 @@
+local bench = require("bench").new(arg)
local function integrate(x0, x1, nsteps, omegan, f)
local x, dx = x0, (x1-x0)/nsteps
@@ -26,9 +27,16 @@ local function series(n)
end
local n = tonumber(arg and arg[1]) or 10000
-local tm = os.clock()
-local t = series(n)
-tm = os.clock() - tm
-assert(math.abs(t[1]-2.87295) < 0.00001)
-io.write(string.format("size %d, %.2f s, %.1f iterations/s\n",
- n, tm, (2*n-1)/tm))</pre>
</blockquote>
debug print was lost, is it intentional?
<blockquote type="cite"
cite="mid:1a8a820fc79739ef091e7fbd3f127313f12785a1.1761301736.git.skaplun@tarantool.org">
<pre wrap="" class="moz-quote-pre">
+
+bench:add({
+ name = "series",
+ checker = function(res)
+ return math.abs(res[1]-2.87295) < 0.00001</pre>
</blockquote>
add more whitespaces
<blockquote type="cite"
cite="mid:1a8a820fc79739ef091e7fbd3f127313f12785a1.1761301736.git.skaplun@tarantool.org">
<pre wrap="" class="moz-quote-pre">
+ end,
+ payload = function()
+ return series(n)
+ end,
+ items = 2 * n - 1,
+})
+
+bench:run_and_report()
</pre>
</blockquote>
</body>
<lt-container></lt-container>
</html>