Skip to content

Commit

Permalink
fix table
Browse files Browse the repository at this point in the history
  • Loading branch information
jdonszelmann committed Jun 9, 2023
1 parent 9987b1d commit f6db964
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ fn main() {

# Comparison of ringbuffer types

| type | heap allocated | growable | size must be power of 2 | `no_std` |
|-----------------------------------------------|----------------|----------|-------------------------|----------|
| `AllocRingBuffer<T, PowerOfTwo>` | yes | no | yes | no |
| `AllocRingBuffer<T, NonPowerOfTwo>` | yes | no | no | no |
| `GrowableAllocRingBuffer<T>` | yes | yes | no | no |
| `ConstGenericRingBuffer<T, const CAP: usize>` | no | no | no[^1] | yes |
| type | heap allocated | growable | size must be power of 2 | requires alloc[^2] |
|-----------------------------------------------|----------------|----------|-------------------------|--------------------|
| `AllocRingBuffer<T, PowerOfTwo>` | yes | no | yes | yes |
| `AllocRingBuffer<T, NonPowerOfTwo>` | yes | no | no | yes |
| `GrowableAllocRingBuffer<T>` | yes | yes | no | yes |
| `ConstGenericRingBuffer<T, const CAP: usize>` | no | no | no[^1] | no |

[^1]: Using a size that is not a power of 2 will be ~3x slower.
[^2]: All ringbuffers are `no_std`, but some require an allocator to be available.

## To other ringbuffers

Expand Down

1 comment on commit f6db964

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.