arc_vec
- Arc Vector
- Experimental work to run vectors in parallel
// Consider Arc<[T]> over Vec <T>
// Arc<[T]>
use ArcVec;
let my_num_arcvec_init: = new;
dependencies
[]
= "0"
example
arcnew
use ArcVec;
- macro
use arc_vec;
성능 평가 benches
- criterion.rs - Statistics-driven benchmarking library for Rust
cargo bench
| rayonparallel_sort() | vs | basic sort() |
|---|---|---|
| vs | ||
| - | Estimate | - |
| 0.0162498 | R² | 0.0025004 |
| 17.870 ms | Mean | 27.310 ms |
| 267.86 µs | Std. Dev. | 176.25 µs |
| 17.818 ms | Median | 27.226 ms |
| 299.22 µs | MAD | 73.193 µs |
-
Understanding this report:
-
The plot on the left displays the average time per iteration for this benchmark. The shaded region shows the estimated probability of an iteration taking a certain amount of time, while the line shows the mean. Click on the plot for a larger view showing the outliers.
-
The plot on the right shows the linear regression calculated from the measurements. Each point represents a sample, though here it shows the total time for the sample rather than time per iteration. The line is the line of best fit for these measurements.
-
-
See the documentation for more details on the additional statistics.
rayon_parallel_sort
basic sort
- example
Test 환경
rustc --version --verbose
$ rustc --version --verbose
rustc 1.88.0 (6b00bc388 2025-06-23)
binary: rustc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: x86_64-unknown-linux-gnu
release: 1.88.0
LLVM version: 20.1.5
OS: Ubuntu 24.04.2 LTS x86_64
Kernel: Linux 6.14.0-24-generic
Shell: fish 3.7.1
DE: GNOME 46.0
WM: Mutter (X11)
Terminal: GNOME Terminal 3.52.0
CPU: 13th Gen Intel(R) Core(TM) i5-136z
GPU 1: NVIDIA GeForce RTX 3060 Ti Lite
GPU 2: Intel UHD Graphics 770 @ 1.55 G
Memory: 6.93 GiB / 94.09 GiB
Todo
- sort fn
- reverse fn
- append string
- benches
- ArcVec VS Vec::new
- Parallel sort VS Basic Sort
- Docs
- lib.rs_rayon내용추가
- concurrency VS parallelism 차이점
License
This project is licensed under the MIT license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in ArcVec by you, shall be licensed as MIT, without any additional terms or conditions.