Skip to content

Commit 55892e5

Browse files
committed
Updated README
1 parent e4d0371 commit 55892e5

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@
66
![macOS](https://img.shields.io/badge/os-macOS-green.svg?style=flat)
77
![tuxOS](https://img.shields.io/badge/os-tuxOS-green.svg?style=flat)
88

9-
The goal of this project is to provide an easy to use [RFC4648](https://tools.ietf.org/html/rfc4648)
10-
complient base64 encode and decode implentation in pure Swift. Further this implementation
11-
tries to be faster than the [Foundation Base64](https://developer.apple.com/documentation/foundation/nsdata)
12-
implementation.
139

14-
Right now the implementation is dead simple. No fancy precomputed lookup tables, no fancy
15-
SIMD instructions.
10+
This project provides a base64 encoder and decoder in pure Swift (without the use of Foundation). The implementation is [RFC4648](https://tools.ietf.org/html/rfc4648) complient.
11+
12+
Today the implementation is rather simple. No fancy precomputed lookup tables, no fancy SIMD instructions. Therefore, there is definitely room for improvement performance wise. See also [Literature for a faster algorithm](#user-content-literature-for-a-faster-algorithm)
1613

1714
Everything began with [an issue](https://github.com/apple/swift-nio/issues/1265) on [`swift-nio`](https://github.com/apple/swift-nio).
1815

@@ -52,14 +49,13 @@ Whatevar runs GitHub Actions 😉
5249
|:--|:--|:--|
5350
| Foundation | 33.64s | 3.49s |
5451
| swift-base64 | 1.07s | 1.27s |
55-
| Speedup | 31.18x | 2.74x |
52+
| Speedup | **31.18x** | 2.74x |
5653

5754
I have no idea why Foundation base64 encoding is so slow on linux. 🤷‍♂️
5855

5956
## Literature for a faster algorithm
6057

61-
I would really like to speedup this repository further to be way faster than it is today.
62-
Some food for thought of how this could be approached can be found here:
58+
I would really like to speed up this project further to be way faster than it is today. Some food for thought of how this could be approached can be found here:
6359

6460
- [Chromium precomputed lookup tables](https://github.com/lemire/fastbase64/blob/master/src/chromiumbase64.c)
6561
- [Wojciech Muła, Daniel Lemire: Faster Base64 Encoding and Decoding using AVX2 Instructions](https://arxiv.org/pdf/1704.00605.pdf).
@@ -68,8 +64,7 @@ Some food for thought of how this could be approached can be found here:
6864

6965
## Alternatives
7066

71-
As of today (2019-12-10) the author is only aware of two alternatives that both offer
72-
only encoding. Only one of those is a real library.
67+
As of today (2019-12-10) the author is only aware of two alternatives that both offer only encoding.
7368

7469
- [SwiftyBase64](https://github.com/drichardson/SwiftyBase64)
7570
- [NIOWebSocket - Base64](https://github.com/apple/swift-nio/blob/master/Sources/NIOWebSocket/Base64.swift)

0 commit comments

Comments
 (0)