Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 31 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ on:

env:
RUST_BACKTRACE: 1
# later
# RUSTFLAGS: -Dwarnings
CARGO_TERM_COLOR: always

rust_nightly: nightly-2022-07-23
rust_nightly: nightly-2023-03-21

jobs:
tests-pass:
Expand Down Expand Up @@ -41,7 +38,7 @@ jobs:
- ''
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
Expand All @@ -55,7 +52,7 @@ jobs:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
with:
submodules: true
- name: Install Rust clippy
Expand All @@ -71,7 +68,7 @@ jobs:
miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
Expand All @@ -82,3 +79,30 @@ jobs:
cd ci
chmod +x miri.sh
./miri.sh

benchmark:
name: Benchmark
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rustfmt, clippy
- name: Cache cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build benchmark
run: cargo build --release --bench benchmark
- name: Run benchmark
run: cargo bench --bench benchmark
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[workspace]

members = [
"doublets-ffi",
"doublets",
Expand All @@ -12,7 +11,8 @@ members = [
# internal
"integration"
]

# in global rework
exclude = [
"doublets-decorators",
]
]
2 changes: 1 addition & 1 deletion dev-deps/data-rs
3 changes: 2 additions & 1 deletion doublets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ description = """
"""

[dependencies]
criterion = "0.3.5"
tap = { version = "1.0.1" }
cfg-if = { version = "1.0.0" }
thiserror = { version = "1.0.30" }
Expand Down Expand Up @@ -50,7 +51,7 @@ full = ["platform", "rayon", "small-search"]
[dev-dependencies]
tap = { version = "1.0.1" }
rand = { version = "0.8.5" }
criterion = { version = "0.3.6" }
criterion = { version = "0.4.0" }
bumpalo = { version = "3.10.0", features = ["allocator_api", "collections"] }
mimalloc = { version = "0.1.29", default-features = false }
rpmalloc = "0.2.0"
Expand Down
15 changes: 15 additions & 0 deletions doublets/benches/benchmark.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use data::Flow::Continue;
use doublets::{split::Store, Doublets, DoubletsExt, Links};
use mem::Global;

fn iter(c: &mut Criterion) {
let mut store = Store::<usize, _, _>::new(Global::new(), Global::new()).unwrap();

for _ in 0..1_000_000 {
store.create_point().unwrap();
}
}

criterion_group!(benches, iter);
criterion_main!(benches);