{"id":18446633,"url":"https://github.com/cristalhq/lvlbp","last_synced_at":"2025-04-15T02:40:15.671Z","repository":{"id":57624895,"uuid":"390407392","full_name":"cristalhq/lvlbp","owner":"cristalhq","description":"Leveled byte pool","archived":false,"fork":false,"pushed_at":"2021-08-24T13:54:57.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T12:57:38.068Z","etag":null,"topics":["allocation","allocator","byte-slice","dependency-free","go","golang","memory-management","performance","pool"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cristalhq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-28T15:47:41.000Z","updated_at":"2021-10-11T12:54:58.000Z","dependencies_parsed_at":"2022-08-26T22:23:26.658Z","dependency_job_id":null,"html_url":"https://github.com/cristalhq/lvlbp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristalhq%2Flvlbp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristalhq%2Flvlbp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristalhq%2Flvlbp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristalhq%2Flvlbp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cristalhq","download_url":"https://codeload.github.com/cristalhq/lvlbp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248996394,"owners_count":21195718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["allocation","allocator","byte-slice","dependency-free","go","golang","memory-management","performance","pool"],"created_at":"2024-11-06T07:09:51.887Z","updated_at":"2025-04-15T02:40:15.640Z","avatar_url":"https://github.com/cristalhq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lvlbp\n\n[![build-img]][build-url]\n[![pkg-img]][pkg-url]\n[![reportcard-img]][reportcard-url]\n[![coverage-img]][coverage-url]\n\nLeveled byte pool. Inspired by [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics).\n\n## Rationale\n\nInstead of having 1 pool for byte slices, we create multiple pools that are serving slices of a particular size. This reduces overhead for the smaller slices, because they will not be resized when we request for the bigger slices. Also library provides stats to see how many allocations do we have for each class.\n\n## Install\n\n```\ngo get github.com/cristalhq/lvlbp\n```\n\n## Example\n\n```go\nsize := 42\nbb := lvlbp.Get(size)\ndefer lvlbp.Put(bb)\n\n// do something with bb of size `closestPowerOf2(42)`\n```\n\n## Documentation\n\nSee [these docs][pkg-url].\n\n## License\n\n[MIT License](LICENSE).\n\n[build-img]: https://github.com/cristalhq/lvlbp/workflows/build/badge.svg\n[build-url]: https://github.com/cristalhq/lvlbp/actions\n[pkg-img]: https://pkg.go.dev/badge/cristalhq/lvlbp\n[pkg-url]: https://pkg.go.dev/github.com/cristalhq/lvlbp\n[reportcard-img]: https://goreportcard.com/badge/cristalhq/lvlbp\n[reportcard-url]: https://goreportcard.com/report/cristalhq/lvlbp\n[coverage-img]: https://codecov.io/gh/cristalhq/lvlbp/branch/master/graph/badge.svg\n[coverage-url]: https://codecov.io/gh/cristalhq/lvlbp\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristalhq%2Flvlbp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcristalhq%2Flvlbp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristalhq%2Flvlbp/lists"}