nugine / simd Goto Github PK
View Code? Open in Web Editor NEWSIMD-accelerated operations
License: MIT License
SIMD-accelerated operations
License: MIT License
error[E0425]: cannot find function `_mm_crc32_u64` in this scope
--> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\simd-abstraction-0.7.0\src\arch\x86.rs:369:18
|
369 | unsafe { _mm_crc32_u64(crc as u64, value) as u32 }
| ^^^^^^^^^^^^^ help: a function with a similar name exists: `_mm_crc32_u16`
base64-simd
and other simd crates need more examples for common use cases.
Consider refactoring all the APIs for further extensions.
Related:
[profile.bench]
lto = "fat"
codegen-units = 1
Currently forgiving mode handles no padding properly:
decoding SGVsbG8sIHdvcmxkIQ
= Hello, world!
but decoding to little padding SGVsbG8sIHdvcmxkIQ=
errors.
It would be great if forgiving mode appends the correct padding. Similarly it could also ignore extra padding:
aGVsbG8==
= hello
Hi Nugine,
I'm planning to add a new charset support to simd-base32, and is stuck with the alsw decoder implementation.
Given that the charset is:
const BASE32CROCKFORD_CHARSET: &[u8; 32] = b"0123456789ABCDEFGHJKMNPQRSTVWXYZ";
I have the decode function as:
#[inline]
const fn decode(c: u8) -> u8 {
match c {
b'0'..=b'9' => c - b'0',
b'A'..=b'H' => c - b'A' + 10,
b'J'..=b'K' => c - b'J' + 18,
b'M'..=b'N' => c - b'M' + 20,
b'P'..=b'T' => c - b'P' + 22,
b'V'..=b'Z' => c - b'V' + 27,
_ => 0xff,
}
}
But it is unclear to me how the check_hash function is implemented. Would you please add some documentation to the implementation and the verification of such functions?
Thanks!
Related:
now vsimd support integer number only, but it in 3D math it represent floating number, please consider support it as possible ?
For all multiversion symbols, analyze code size
API docs in English and Chinese
Project Status:
Docs:
encode
and decode
.Tests:
Needs design:
Experimental
Issues
The arch::is_aarch64_feature_detected! feature has been stabilized as of rust 1.60.0: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1600-2022-04-07
And armv8 neon intrinsics for aarch64 are stabilized as of rust 1.59.0: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1590-2022-02-24
The hex simd features in particular should be possible to use without the unstable flag.
Awesome work on this library btw, very useful!
Related crates:
base64-simd
这么好的东西 github 默认搜索不到啊
Current supported instruction sets (2022-11-18):
Upstream blockers: (2022-11-18)
https://github.com/Nugine/simd-benches/actions/runs/8495251262
LLVM failed to emit vpavgb for _mm256_avg_epu8.
Blaming rust-lang/stdarch#1477
Keep tracking performance
Updated by GitHub Action automatically
base64-simd
is the fastest base64 crate.hex-simd
is the fastest hex crate.Improve throughput by using multi-threading (rayon).
In most cases, the simd functions are fast enough that we may not benefit from multi-threading. And some functions are not divisible.
Crates with parallel api:
Upstream:
https://rust.godbolt.org/z/qjx6znnq4
rustc 1.67.0-nightly (83356b78c 2022-11-17)
binary: rustc
commit-hash: 83356b78c4ff3e7d84e977aa6143793545967301
commit-date: 2022-11-17
host: x86_64-unknown-linux-gnu
release: 1.67.0-nightly
LLVM version: 15.0.4
https://developer.arm.com/documentation/den0018/a/NEON-Instruction-Set-Architecture/Alignment
Would it be possible to add a simple encode/decode method pair?
e.g:
encode_to_slice(source:&[u8],dest:&mut [u8])->Result(usize, Error)
decode_to_slice(source: &[u8], dest[&mut[u8])->Result(usize, Error)
so the caller does not need to call sizing additionally to find out how much was written. It just makes it a little more fluid to use.
This obviously assumes the dest buffers are large enough to hold the output (as with the other encode/decode methods)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.