All Projects → imdario → go-ulid

imdario / go-ulid

Licence: MIT license
Universally Unique Lexicographically Sortable Identifier (ULID) in Go - Please use https://github.com/oklog/ulid

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to go-ulid

ulid
Haskell implementation of ULIDs (Unique Lexicographically Sortable Identifiers)
Stars: ✭ 22 (-29.03%)
Mutual labels:  uuid, ulid
ulid
Universally Unique Lexicographically Sortable Identifier (ULID) in Crystal
Stars: ✭ 28 (-9.68%)
Mutual labels:  uuid, ulid
ulid-creator
A Java library for generating Universally Unique Lexicographically Sortable Identifiers (ULID)
Stars: ✭ 38 (+22.58%)
Mutual labels:  uuid, ulid
uuid-generator-plugin
An IntelliJ Idea plugin to generate UUID (Universally Unique Identifier), ULID (Universally Unique Lexicographically Sortable Identifier) and CUID (Collision Resistant Unique Identifier)
Stars: ✭ 30 (-3.23%)
Mutual labels:  uuid, ulid
python-ulid
ULID implementation for Python
Stars: ✭ 177 (+470.97%)
Mutual labels:  uuid, ulid
rulid.rs
Rust Universally Unique Lexicographically Sortable Identifier
Stars: ✭ 40 (+29.03%)
Mutual labels:  uuid, ulid
Javascript
Universally Unique Lexicographically Sortable Identifier
Stars: ✭ 1,781 (+5645.16%)
Mutual labels:  uuid, ulid
sno
Compact, sortable and fast unique IDs with embedded metadata.
Stars: ✭ 77 (+148.39%)
Mutual labels:  uuid
uuid
A decentralized favorites and bookmarks based on Git hosting
Stars: ✭ 70 (+125.81%)
Mutual labels:  uuid
friendly-id
Java Friendly Id for UUID
Stars: ✭ 173 (+458.06%)
Mutual labels:  uuid
python-libuuid
Faster UUID generation using libuuid
Stars: ✭ 36 (+16.13%)
Mutual labels:  uuid
uuidgen-el
UUID generation implemented in elisp.
Stars: ✭ 44 (+41.94%)
Mutual labels:  uuid
pure-uuid
Pure JavaScript Based Universally Unique Identifiers (UUID)
Stars: ✭ 60 (+93.55%)
Mutual labels:  uuid
uuids
UUID library for Nim
Stars: ✭ 28 (-9.68%)
Mutual labels:  uuid
rs-nuid
NATS unique identifiers
Stars: ✭ 19 (-38.71%)
Mutual labels:  uuid
react-native-uuid-generator
UUID generator for React Native utilizing native iOS and Android UUID classes
Stars: ✭ 88 (+183.87%)
Mutual labels:  uuid
uid
Provides an object-oriented API to generate and represent UIDs.
Stars: ✭ 315 (+916.13%)
Mutual labels:  uuid
uuid
Go package for UUIDs based on RFC 4122 Time-Based UUID
Stars: ✭ 38 (+22.58%)
Mutual labels:  uuid
SierraChartZorroPlugin
A Zorro broker API plugin for Sierra Chart, written in Win32 C++.
Stars: ✭ 22 (-29.03%)
Mutual labels:  uuid
php-uuid
RFC 4122 compliant UUID generator and parser for PHP.
Stars: ✭ 13 (-58.06%)
Mutual labels:  uuid

Universally Unique Lexicographically Sortable Identifier

Project status Go Report Card GoDoc MIT licensed

alizain/ulid port to Golang (binary format implemented).

Why ULID?

Check out ULID's README.

About this implementation

Important: this repository has been archived. Please use oklog/ulid implementation.

I ported it to see how fast would be the same algorithm in Go. Also, it is cryptographically secure using crypto/rand.

Installation

go get github.com/imdario/go-ulid

Usage

import (
    "github.com/imdario/go-ulid"
)

// ...

u := ulid.New()

Performance

On a Intel Core 2 Duo 6600 @ 2.40 GHz, Windows 10 and Go 1.6.3:

BenchmarkULID-2                  1000000              1029 ns/op              16 B/op          1 allocs/op
BenchmarkEncodedULID-2           1000000              1249 ns/op              48 B/op          2 allocs/op
BenchmarkSingleEncodedULID-2    10000000               206 ns/op              32 B/op          1 allocs/op

Approx. 800.640 op/s, 46 times faster than Javascript original implementation.

How does it compare to UUID?

Using google/uuid:

BenchmarkUUID-2                  1000000              1041 ns/op              16 B/op          1 allocs/op
BenchmarkEncodedUUID-2           1000000              1407 ns/op              64 B/op          2 allocs/op
BenchmarkSingleEncodedUUID-2     5000000               302 ns/op              48 B/op          1 allocs/op

go-ulid is about 12% faster than Google's UUID!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].