Skip to content

Commit b01661f

Browse files
committed
Add readme and gitignore
1 parent 6c9d195 commit b01661f

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Manifest.toml
1010
experimental
1111
refs
1212
*.mathcha
13-
13+
/benchmark/results/

benchmark/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# TensorKit Benchmarks
2+
3+
This directory contains a benchmark suite for TensorKit.
4+
Most of the benchmarks are designed to capture performance characteristics of the library, and are not intended to be used as a benchmark suite for comparing different libraries.
5+
In particular, the main goal here is to catch performance regressions and/or improvements between different versions of TensorKit.
6+
7+
## Running the benchmarks
8+
9+
The benchmarks are written using `BenchmarkTools.jl`, and the full suite can be found in the `SUITE` global variable defined in `benchmarks.jl`.
10+
Sometimes, it is useful to run only a subset of the benchmarks.
11+
To do this, you can use the `--modules` flag to specify which modules to run.
12+
Alternatively, you can use the `TensorKitBenchmarks` module directly, which is designed after `BaseBenchmarks` to allow for conditional loading of the benchmarks.
13+
14+
For a more streamlined CLI experience, you can use [`AirspeedVelocity.jl`](https://github.com/MilesCranmer/AirspeedVelocity.jl) to run the benchmarks.
15+
The following command will run the benchmarks and compare with the current master branch:
16+
17+
```bash
18+
benchpkg TensorKit \
19+
--rev=dirty,master \
20+
-o benchmark/results/ \
21+
-exeflags="--threads=4"
22+
```
23+
24+
To compare with previous results, the following command can be used:
25+
26+
```bash
27+
benchpkgtable TensorKit \
28+
--rev=dirty,master \
29+
-i benchmark/results/ \
30+
-o benchmark/results/ \
31+
```

0 commit comments

Comments
 (0)