Mercurial > repos > public > sbplib_julia
comparison benchmark/benchmarks.jl @ 1182:3e4db8cf1d92 tooling/benchmarks
Temporarily simplify the dummy benchmark suite
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Fri, 27 Jan 2023 11:52:46 +0100 |
| parents | 50c31500eb97 |
| children | 1aca445216b8 |
comparison
equal
deleted
inserted
replaced
| 1181:f49bac53e72b | 1182:3e4db8cf1d92 |
|---|---|
| 7 teststr = String(join(rand(MersenneTwister(1), 'a':'d', 10^4))) | 7 teststr = String(join(rand(MersenneTwister(1), 'a':'d', 10^4))) |
| 8 SUITE["utf8"]["replace"] = @benchmarkable replace($teststr, "a" => "b") | 8 SUITE["utf8"]["replace"] = @benchmarkable replace($teststr, "a" => "b") |
| 9 SUITE["utf8"]["join"] = @benchmarkable join($teststr, $teststr) | 9 SUITE["utf8"]["join"] = @benchmarkable join($teststr, $teststr) |
| 10 SUITE["utf8"]["plots"] = BenchmarkGroup() | 10 SUITE["utf8"]["plots"] = BenchmarkGroup() |
| 11 | 11 |
| 12 SUITE["trigonometry"] = BenchmarkGroup(["math", "triangles"]) | 12 # SUITE["trigonometry"] = BenchmarkGroup(["math", "triangles"]) |
| 13 SUITE["trigonometry"]["circular"] = BenchmarkGroup() | 13 # SUITE["trigonometry"]["circular"] = BenchmarkGroup() |
| 14 for f in (sin, cos, tan) | 14 # for f in (sin, cos, tan) |
| 15 for x in (0.0, pi) | 15 # for x in (0.0, pi) |
| 16 SUITE["trigonometry"]["circular"][string(f), x] = @benchmarkable ($f)($x) | 16 # SUITE["trigonometry"]["circular"][string(f), x] = @benchmarkable ($f)($x) |
| 17 end | 17 # end |
| 18 end | 18 # end |
| 19 | 19 |
| 20 SUITE["trigonometry"]["hyperbolic"] = BenchmarkGroup() | 20 # SUITE["trigonometry"]["hyperbolic"] = BenchmarkGroup() |
| 21 for f in (sin, cos, tan) | 21 # for f in (sin, cos, tan) |
| 22 for x in (0.0, pi) | 22 # for x in (0.0, pi) |
| 23 SUITE["trigonometry"]["hyperbolic"][string(f), x] = @benchmarkable ($f)($x) | 23 # SUITE["trigonometry"]["hyperbolic"][string(f), x] = @benchmarkable ($f)($x) |
| 24 end | 24 # end |
| 25 end | 25 # end |
| 26 | 26 |
| 27 SUITE | 27 SUITE |
| 28 | 28 |
| 29 # TODO: Add mercurial version of benchmarkpkg | 29 # TODO: Add mercurial version of benchmarkpkg |
| 30 # TODO: Make it easy to compare different commits. (A simple script?) | 30 # TODO: Make it easy to compare different commits. (A simple script?) |
