Skip to content

Commit

Permalink
Renamed project.
Browse files Browse the repository at this point in the history
  • Loading branch information
dragostis committed Sep 19, 2024
1 parent 780a8a9 commit 2ff0ce9
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "spice"
name = "chili"
version = "0.1.0"
edition = "2021"

Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# spice-rs
# chili

## Rust port of [Spice], a low-overhead parallelization library

Expand Down Expand Up @@ -39,23 +39,23 @@ theoretical maximum, it's worth noting that the actual time per node is 0.8ns
vs. a theoretical 1.8 / 8 = 0.2ns, if we're to compare against the 1K nodes
case.

| Number of nodes | Baseline | Rayon | spice-rs | Baseline / spice-rs |
|----------------:|---------:|---------:|---------:|:-------------------:|
| 1023 | 1.8 µs | 51.1 µs | 3.4 µs | **x0.53** |
| 16777215 | 94.4 ms | 58.1 ms | 13.6 ms | **x6.94** |
| 134217727 | 797.5 ms | 497.2 ms | 101.8 ms | **x7.83** |
| Number of nodes | Baseline | Rayon | chili | Baseline / chili |
|----------------:|---------:|---------:|---------:|:----------------:|
| 1023 | 1.8 µs | 51.1 µs | 3.4 µs | **x0.53** |
| 16777215 | 94.4 ms | 58.1 ms | 13.6 ms | **x6.94** |
| 134217727 | 797.5 ms | 497.2 ms | 101.8 ms | **x7.83** |

### Apple M1 (8 cores)

| Number of nodes | Baseline | Rayon | spice-rs | Baseline / spice-rs |
|----------------:|---------:|---------:|---------:|:-------------------:|
| 1023 | 1.6 µs | 29.2 µs | 3.5 µs | **x0.46** |
| 16777215 | 39.4 ms | 40.5 ms | 11.2 ms | **x3.51** |
| 67108863 | 156.5 ms | 167.1 ms | 44.3 ms | **x3.53** |
| Number of nodes | Baseline | Rayon | chili | Baseline / chili |
|----------------:|---------:|---------:|---------:|:----------------:|
| 1023 | 1.6 µs | 29.2 µs | 3.5 µs | **x0.46** |
| 16777215 | 39.4 ms | 40.5 ms | 11.2 ms | **x3.51** |
| 67108863 | 156.5 ms | 167.1 ms | 44.3 ms | **x3.53** |

### spice-rs overhead on AMD Ryzen 7 4800HS (8 cores)
### chili overhead on AMD Ryzen 7 4800HS (8 cores)

The oveerhead in the 1K nodes case remains approximately constant with respect
The overhead in the 1K nodes case remains approximately constant with respect
to the number of threads.

| Number of nodes | Baseline | 1 thread | 2 threads | 4 threads | 8 threads |
Expand Down
4 changes: 2 additions & 2 deletions benches/overhead.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use chili::{Scope, ThreadPool};
use divan::Bencher;
use spice::{Scope, ThreadPool};

struct Node {
val: u64,
Expand Down Expand Up @@ -55,7 +55,7 @@ fn no_overhead(bencher: Bencher, nodes: (usize, usize)) {
}

#[divan::bench(args = nodes())]
fn spice_overhead(bencher: Bencher, nodes: (usize, usize)) {
fn chili_overhead(bencher: Bencher, nodes: (usize, usize)) {
fn sum(node: &Node, scope: &mut Scope<'_>) -> u64 {
let (left, right) = scope.join(
|s| node.left.as_deref().map(|n| sum(n, s)).unwrap_or_default(),
Expand Down
16 changes: 8 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![deny(missing_docs)]
#![deny(unsafe_op_in_unsafe_fn)]

//! # spice-rs. A Rust port of [Spice], a low-overhead parallelization library
//! # chili. Rust port of [Spice], a low-overhead parallelization library
//!
//! A crate for very low-overhead fork-join workloads that can potentially be
//! run in parallel.
Expand All @@ -15,7 +15,7 @@
//! # Examples
//!
//! ```
//! # use spice::{Scope, ThreadPool};
//! # use chili::{Scope, ThreadPool};
//! struct Node {
//! val: u64,
//! left: Option<Box<Node>>,
Expand Down Expand Up @@ -174,7 +174,7 @@ impl DerefMut for ThreadJobQueue<'_> {
/// # Examples
///
/// ```
/// # use spice::ThreadPool;
/// # use chili::ThreadPool;
/// let mut tp = ThreadPool::new().unwrap();
/// let mut s = tp.scope();
///
Expand Down Expand Up @@ -357,7 +357,7 @@ impl<'s> Scope<'s> {
/// # Examples
///
/// ```
/// # use spice::ThreadPool;
/// # use chili::ThreadPool;
/// let mut tp = ThreadPool::new().unwrap();
/// let mut s = tp.scope();
///
Expand Down Expand Up @@ -387,7 +387,7 @@ impl<'s> Scope<'s> {
/// # Examples
///
/// ```
/// # use spice::ThreadPool;
/// # use chili::ThreadPool;
/// let mut tp = ThreadPool::new().unwrap();
/// let mut s = tp.scope();
///
Expand Down Expand Up @@ -453,7 +453,7 @@ impl ThreadPool {
/// # Examples
///
/// ```
/// # use spice::ThreadPool;
/// # use chili::ThreadPool;
/// let _tp = ThreadPool::new().unwrap();
/// ```
pub fn new() -> Option<Self> {
Expand All @@ -466,7 +466,7 @@ impl ThreadPool {
///
/// ```
/// # use std::time::Duration;
/// # use spice::{Config, ThreadPool};
/// # use chili::{Config, ThreadPool};
/// let _tp = ThreadPool::with_config(Config {
/// thread_count: Some(1),
/// heartbeat_interval: Duration::from_micros(50),
Expand Down Expand Up @@ -512,7 +512,7 @@ impl ThreadPool {
/// # Examples
///
/// ```
/// # use spice::ThreadPool;
/// # use chili::ThreadPool;
/// let mut tp = ThreadPool::new().unwrap();
/// let mut s = tp.scope();
///
Expand Down

0 comments on commit 2ff0ce9

Please sign in to comment.