ulid-ruby
ulid-ruby copied to clipboard
Universally Unique Lexicographically-sortable time-based Identifiers for Ruby projects
`ENCODING` is a String, and `String#[]` allocates another 1 char wise String. So each `encode32` call allocates almost 40 useless strings. By using an array instead, we avoid these allocations.
Ref: https://bugs.ruby-lang.org/issues/20205 In Ruby 3.4 string literals will be "chilled" by default. Meaning they are still mutable, but will pretend to be frozen, and emit a warning when mutated. Then...
Setup GitHub action CI & remove Travis CI config.
We can avoid extra allocation by directly calling `#to_h` on `ENCODING.split('').each_with_index` instead of first converting it to an array and then converting it to a hash. This is not a...
Fork merge inclusive of: - Optimized ULID encodings in https://github.com/abachman/ulid-ruby/pull/10 - Type coercion improvements in https://github.com/abachman/ulid-ruby/pull/11 - Bug fix in https://github.com/abachman/ulid-ruby/commit/3ba0841933cc737d5bd65bfc9f5398376e9e080f , as well as the small cleanups and version...
This PR focuses on optimizing the memory allocation for the byte manipulation to and from the Rockford Base32 encoding and bytes. Specifically the encode32 and decode32 can better utilize the...
A ULID is nothing more than an uInt128 with encoding convenience. This PR enables the conversion to / from UUID forms to a ULID. Likewise enables support of the BigNum...
The commit with the fix: https://github.com/abachman/ulid-ruby/commit/7349c9325106c162a7014fdc076d6d22bdc898f1 We recently upgraded to Ruby 3.4 and started seeing a ton of warnings regarding this.
Related to [this](https://github.com/abachman/ulid-ruby/issues/14) issue