Skip to content

Commit 3575f88

Browse files
committed
updates
1 parent 7670bbb commit 3575f88

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# php-uuid-base58
2+
3+
<p>
4+
https://img.shields.io/travis/cbschuld/php-uuid-base58/master?style=flat-square
5+
</p>
6+
27
Generates a RFC4122 compliant v4 UUID and returns it encoded in base-58. This is great for creating unique IDs which only consume 22 characters of storage. Also provides base-58 encoding and decoding.
38

49
## Installation
@@ -34,8 +39,6 @@ npm run test
3439

3540
There is an additional performance hit to translate a v4 UUID into base58. In testing I found the overhead for the translation to base58 adds an additional 31%. In 100k calculation batches I found that v4 uuid calculation took 1.606s/100k vs 2.319s/100k for uuid58. Thus, 69% of the runtime was consumed calculating a v4 uuid. Additional work could be done to bring the uuid calculation internal and attempt to increase performance.
3641

37-
![performance graph](https://raw.githubusercontent.com/cbschuld/uuid-base58/master/__tests__/performance.png)
38-
3942
## Base58 Alphabet
4043

4144
This solution uses the Bitcoin / IPFS hash alphabet: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz

0 commit comments

Comments
 (0)