Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

阳了阳了 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
Binary file added .DS_Store
Binary file not shown.
Binary file added baibaidui/.DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions baibaidui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vscode
concurrent_skiplist/target
8 changes: 8 additions & 0 deletions baibaidui/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions baibaidui/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions baibaidui/.idea/rust_hackathon_kv.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions baibaidui/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions baibaidui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# rust_hackathon_kv

## test record

### 正确性测试

![img.png](rsc/test_res)

### 性能测试

我们实现的是无锁跳表,与b树+大锁做对比

多个线程插入顺序的key,此处我们的更快

![img.png](rsc/wr_in_order_read_ranges.png)

多线程分范围随即写性能,此处速度比btree快

![img.png](rsc/multithread_range_random_wr.png)

读性能大小范围都优于btree

![img.png](rsc/rd_small_range)

![img.png](rsc/rd_big_range.png)

删除性能由于删除后就没了,所以每次iter先insert然后删除
我们的跳表更快

![img.png](rsc/remove.png)


25 changes: 25 additions & 0 deletions baibaidui/concurrent_skiplist/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "concurrent_skiplist"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
atomic-option = "0.1.2"
rand = "0.8.5"
#spinlock = "0.1.2"
parking_lot = "0.12.1"
crossbeam = "0.8"
crossbeam-skiplist = "0.1"
bumpalo-herd = "0.1.2"
# kudzu = "0.1.0"

[dev-dependencies]
criterion = "0.4.0"

[[bench]]
# name = "benchall"
name = "bench_jjj"
harness = false

Loading