Mercurial > repos > public > sbplib_julia
view benchmark/benchmarks.jl @ 1183:aefe4b551901 tooling/benchmarks
Fix add_rev_info
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 27 Jan 2023 11:56:38 +0100 |
parents | 3e4db8cf1d92 |
children | 1aca445216b8 |
line wrap: on
line source
using BenchmarkTools using Random const SUITE = BenchmarkGroup() SUITE["utf8"] = BenchmarkGroup(["string", "unicode"]) teststr = String(join(rand(MersenneTwister(1), 'a':'d', 10^4))) SUITE["utf8"]["replace"] = @benchmarkable replace($teststr, "a" => "b") SUITE["utf8"]["join"] = @benchmarkable join($teststr, $teststr) SUITE["utf8"]["plots"] = BenchmarkGroup() # SUITE["trigonometry"] = BenchmarkGroup(["math", "triangles"]) # SUITE["trigonometry"]["circular"] = BenchmarkGroup() # for f in (sin, cos, tan) # for x in (0.0, pi) # SUITE["trigonometry"]["circular"][string(f), x] = @benchmarkable ($f)($x) # end # end # SUITE["trigonometry"]["hyperbolic"] = BenchmarkGroup() # for f in (sin, cos, tan) # for x in (0.0, pi) # SUITE["trigonometry"]["hyperbolic"][string(f), x] = @benchmarkable ($f)($x) # end # end SUITE # TODO: Add mercurial version of benchmarkpkg # TODO: Make it easy to compare different commits. (A simple script?) # Should set HGPLAIN before script use. Example: `HGPLAIN= hg st` # `hg id` for getting the revision # `hg update --check` for updating, requires a clean working directory.