Skip to content

Commit

Permalink
DEBT: Refactored to not use strings.Builder for ID generation in fa…
Browse files Browse the repository at this point in the history
…vor of `sync.Pool` for buffer reuse. (#37)

- **FEATURE:** Updated the [PRNG](../x/crypto/prng) reader to allow for each reader instance to have its own `sync.Pool` for buffer reuse.
- **DEBT:** Refactored to not use `strings.Builder` for ID generation in favor of `sync.Pool` for buffer reuse.
- **DEBT:** Modified [README.md](README.md) to include detailed information about `sync.Pool` usage for buffer reuse for both ASCII and Unicode ID generation.
  • Loading branch information
mprimeaux authored Nov 17, 2024
1 parent 8100f52 commit f135389
Show file tree
Hide file tree
Showing 4 changed files with 230 additions and 203 deletions.
19 changes: 17 additions & 2 deletions CHANGELOG/CHANGELOG-1.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ Date format: `YYYY-MM-DD`
### Fixed
### Security

---
## [1.20.0] - 2024-11-16

### Added
### Changed
- **FEATURE:** Updated the [PRNG](../x/crypto/prng) reader to allow for each reader instance to have its own `sync.Pool` for buffer reuse.
- **DEBT:** Refactored to not use `strings.Builder` for ID generation in favor of `sync.Pool` for buffer reuse.
- **DEBT:** Modified [README.md](README.md) to include detailed information about `sync.Pool` usage for buffer reuse for both ASCII and Unicode ID generation.

### Deprecated
### Removed
### Fixed
### Security

---
## [1.19.0] - 2024-11-16

Expand All @@ -27,7 +41,7 @@ Date format: `YYYY-MM-DD`
- **DEBT:** Updated [PRNG](../x/crypto/prng) benchmark tests to test the standard size of 21 characters for Nano ID generation.
- **DEBT:** The runtime configuration (`Config`) now uses pointer receivers for all methods to ensure consistent behavior and interface compliance.
- **DEBT:** Refactored Codebase: Split the `nanoid.go` file into multiple modular files within the `nanoid` package to enhance code organization, readability, and maintainability
-

### Deprecated
### Removed
### Fixed
Expand Down Expand Up @@ -462,7 +476,8 @@ Date format: `YYYY-MM-DD`
### Fixed
### Security

[Unreleased]: https://github.com/sixafter/nanoid/compare/v1.19.0..HEAD
[Unreleased]: https://github.com/sixafter/nanoid/compare/v1.20.0..HEAD
[1.20.0]: https://github.com/sixafter/nanoid/compare/v1.19.0...v1.20.0
[1.19.0]: https://github.com/sixafter/nanoid/compare/v1.18.1...v1.19.0
[1.18.1]: https://github.com/sixafter/nanoid/compare/v1.18.0...v1.18.1
[1.18.0]: https://github.com/sixafter/nanoid/compare/v1.17.3...v1.18.0
Expand Down
Loading

0 comments on commit f135389

Please sign in to comment.