Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
Package goguid is a GUID generation library based on noeqd / snowflake.
All credit belongs to them!

GUID generation and guarantees (GUID size = 64 bit unsigned)

- time            - 42 bit - millisecond precision (~ 100 years)
- machine id      - 10 bit - max. 1024 machines
- sequence number - 12 bit - rolls over after 4096 id's in one millisecond

Performance
  On a DELL Latitude (i5 2.4GHz) notebook it generates approx. 4 million GUID 
  per second.

Usage

  // Initialize the package
  guid.InitGUID(0, 0)

  for i := int64(0); i < max_guids; i++ {
    if guid.GetGUID() != 0 {
      counter++
    }
  }

About

Package goguid is a GUID generation library based on noeqd / snowflake.

Resources

License

Releases

No releases published

Packages

No packages published

Languages