Mercurial > repos > public > sbplib_julia
annotate 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 |
| rev | line source |
|---|---|
| 1171 | 1 using BenchmarkTools |
| 2 using Random | |
| 3 | |
| 4 const SUITE = BenchmarkGroup() | |
| 5 | |
| 6 SUITE["utf8"] = BenchmarkGroup(["string", "unicode"]) | |
| 7 teststr = String(join(rand(MersenneTwister(1), 'a':'d', 10^4))) | |
| 8 SUITE["utf8"]["replace"] = @benchmarkable replace($teststr, "a" => "b") | |
| 9 SUITE["utf8"]["join"] = @benchmarkable join($teststr, $teststr) | |
| 10 SUITE["utf8"]["plots"] = BenchmarkGroup() | |
| 11 | |
|
1182
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
12 # SUITE["trigonometry"] = BenchmarkGroup(["math", "triangles"]) |
|
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
13 # SUITE["trigonometry"]["circular"] = BenchmarkGroup() |
|
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
14 # for f in (sin, cos, tan) |
|
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
15 # for x in (0.0, pi) |
|
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
16 # SUITE["trigonometry"]["circular"][string(f), x] = @benchmarkable ($f)($x) |
|
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
17 # end |
|
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
18 # end |
| 1171 | 19 |
|
1182
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
20 # SUITE["trigonometry"]["hyperbolic"] = BenchmarkGroup() |
|
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
21 # for f in (sin, cos, tan) |
|
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
22 # for x in (0.0, pi) |
|
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
23 # SUITE["trigonometry"]["hyperbolic"][string(f), x] = @benchmarkable ($f)($x) |
|
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
24 # end |
|
3e4db8cf1d92
Temporarily simplify the dummy benchmark suite
Jonatan Werpers <jonatan@werpers.com>
parents:
1174
diff
changeset
|
25 # end |
| 1171 | 26 |
| 27 SUITE | |
| 28 | |
|
1172
34446df5733f
Add run_and_view script
Jonatan Werpers <jonatan@werpers.com>
parents:
1171
diff
changeset
|
29 # TODO: Add mercurial version of benchmarkpkg |
| 1171 | 30 # TODO: Make it easy to compare different commits. (A simple script?) |
| 31 | |
| 32 # Should set HGPLAIN before script use. Example: `HGPLAIN= hg st` | |
|
1174
50c31500eb97
Clean up run_and_view
Jonatan Werpers <jonatan@werpers.com>
parents:
1172
diff
changeset
|
33 # `hg id` for getting the revision |
|
50c31500eb97
Clean up run_and_view
Jonatan Werpers <jonatan@werpers.com>
parents:
1172
diff
changeset
|
34 # `hg update --check` for updating, requires a clean working directory. |
