Skip to content

Commit

Permalink
Add more information on SIMD (#1138)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkmgit authored Jan 6, 2022
1 parent 333515f commit 769a675
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion arrow/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,15 @@ The arrow format declares a IPC protocol, which this crate supports. IPC is equi

#### SIMD

The API provided by the `packed_simd` library is currently `unsafe`. However, SIMD offers a significant performance improvement over non-SIMD operations.
The API provided by the [packed_simd_2](https://docs.rs/packed_simd_2/latest/packed_simd_2/) crate is currently `unsafe`. However,
SIMD offers a significant performance improvement over non-SIMD operations. A related crate in development is
[portable-simd](https://rust-lang.github.io/portable-simd/core_simd/) which has a nice
[beginners guide](https://github.com/rust-lang/portable-simd/blob/master/beginners-guide.md). These crates provide the ability
for code on x86 and ARM architectures to use some of the available parallel register operations. As an example if two arrays
of numbers are added, [1,2,3,4] + [5,6,7,8], rather than using four instructions to add each of the elements of the arrays,
one instruction can be used to all all four elements at the same time, which leads to improved time to solution. SIMD instructions
are typically most effective when data is aligned to allow a single load instruction to bring multiple consecutive data elements
to the registers, before use of a SIMD instruction.

#### Performance

Expand Down
4 changes: 2 additions & 2 deletions arrow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ The arrow crate provides the following features which may be enabled:
- `prettyprint` - support for formatting record batches as textual columns
- `js` - support for building arrow for WebAssembly / JavaScript
- `simd` - (_Requires Nightly Rust_) alternate optimized
implementations of some [compute](https://github.com/apache/arrow/tree/master/rust/arrow/src/compute)
kernels using explicit SIMD processor intrinsics.
implementations of some [compute](https://github.com/apache/arrow-rs/tree/master/arrow/src/compute/kernels)
kernels using explicit SIMD instructions available through [packed_simd_2](https://docs.rs/packed_simd_2/latest/packed_simd_2/).
- `chrono-tz` - support of parsing timezone using [chrono-tz](https://docs.rs/chrono-tz/0.6.0/chrono_tz/)

## Safety
Expand Down

0 comments on commit 769a675

Please sign in to comment.