This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Base64 encoding with simd-support (#34529)
* Optimized scalar code-path * Fixed label names * Implemented vectorized versions * Added reference to source of algorithm * Added back missing namespace * Unsafe.Add instead of Unsafe.Subtract Fixed build-failure (https://ci3.dot.net/job/dotnet_corefx/job/master/job/linux-musl-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/8247/console) Seems like the internal Unsafe doesn't have a Subtract method, so use Add instead. * Added THIRD-PARTY-NOTICES * PR Feedback * THIRD-PARTY-NOTICES in repo-base instead instead in folder Cf. #34529 (comment) * PR Feedback * #34529 (comment) * #34529 (comment) * Rewritten to use raw-pointers instead of GC-tracked refs Cf. #34529 (comment) * Initialized the static fields directly (i.e. w/o cctor) Cf. #34529 (comment) * Added a test for decoding a (encoded) Guid The case with decoding encoded 16 bytes was not covered by tests, so a wrong code got commited before, resulting in DestinationTooSmall instead of the correct Done. * EncodingMap / DecodingMap as byref instead of pointer So got rid of the `rep stosd` in the prolog. Cf. #34529 (comment) * PR Feedback * #34529 (comment) * Debug.Fail instead throwing for the assertion Cf. #34529 (comment) * ROSpan for static data * ROS for lookup maps * In decode avoided stack spill and hoisted zero-vector outside the loops Cf. #34529 (comment) * Assert assumption about destLength Cf. #34529 (comment) * Added comments from original source and some changes to variable names Cf. #34529 (comment) and #34529 (comment) * Use TestZ instead of MoveMask in AVX2-path Cf. #34529 (comment) * Fixed too complicated mask2F creation Improved the version done in c8b6cb3, so the static data isn't needed and code is more compact and readable.
- Loading branch information