File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1+ if not LIB then print (" Please run bench.lua from the same working directory instead" ) return end
2+
13local function benchmark_md5sum ()
2- local it , s = 5 , pcall (require , " md5sum" )
4+ local it , s = 2 , pcall (require , " md5sum" )
35 local bm = BenchmarkStart (" Checksum MD5" , it )
46 local file = io.open (arg [0 ], " rb" )
57
@@ -18,7 +20,7 @@ local function benchmark_md5sum()
1820end
1921
2022local function benchmark_sha256 ()
21- local it , s = 5 , pcall (require , " s256sum" )
23+ local it , s = 1 , pcall (require , " s256sum" )
2224 local bm = BenchmarkStart (" Checksum SHA256" , it )
2325 local file = io.open (arg [0 ], " rb" )
2426
@@ -36,6 +38,5 @@ local function benchmark_sha256()
3638 BenchmarkEnd (bm )
3739end
3840
39- LIB = true
4041benchmark_md5sum ()
4142benchmark_sha256 ()
Original file line number Diff line number Diff line change @@ -164,6 +164,8 @@ benchmark_div()
164164benchmark_pi ()
165165benchmark_gcd ()
166166benchmark_array ()
167+
168+ LIB = true
167169pcall (require , " exbench" ) -- Optionally run extended benchmarks
168170
169171-- Print memory and total time summary at the end of the table
You can’t perform that action at this time.
0 commit comments