{"id":16116666,"url":"https://github.com/dpc/recycle-rs","last_synced_at":"2025-07-07T06:06:22.620Z","repository":{"id":66405437,"uuid":"67854190","full_name":"dpc/recycle-rs","owner":"dpc","description":"Simple allocated buffers reuse for Rust","archived":false,"fork":false,"pushed_at":"2016-09-10T22:00:46.000Z","size":3,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-05T20:56:06.512Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-10T06:06:49.000Z","updated_at":"2016-09-12T19:23:39.000Z","dependencies_parsed_at":"2023-06-02T18:45:25.159Z","dependency_job_id":null,"html_url":"https://github.com/dpc/recycle-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dpc/recycle-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpc%2Frecycle-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpc%2Frecycle-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpc%2Frecycle-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpc%2Frecycle-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpc","download_url":"https://codeload.github.com/dpc/recycle-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpc%2Frecycle-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264023551,"owners_count":23545689,"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":[],"created_at":"2024-10-09T20:25:12.696Z","updated_at":"2025-07-07T06:06:22.597Z","avatar_url":"https://github.com/dpc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Recycle - recycle owned values to avoid allocating\n\n\nStatus: just a prototype to benchmark the idea\n\nIn places where allocating is unavoidable. eg. when having to return `String`\nor `Vec\u003cu8\u003e` from a function, return `Recycle\u003cString\u003e` or `Recycle\u003cVec\u003cu8\u003e\u003e`\nand reuse the allocated values using thread-local pools.\n\n```\ntest alloc_write_vec         … bench:          74 ns/iter (+/- 4)\ntest alloc_write_recycle_vec … bench:          46 ns/iter (+/- 4)\n\ntest alloc_vec_u8            … bench:          22 ns/iter (+/- 1)\ntest recycle_vec_u8          … bench:          14 ns/iter (+/- 1)\n\ntest alloc_vec_u64           … bench:          23 ns/iter (+/- 1)\ntest recycle_vec_u64         … bench:          14 ns/iter (+/- 1)\n```\n\nI've found other library addressing same problem:\nhttps://github.com/frankmcsherry/recycler , but I think this syntax is much\nsimpler to use.\n\n`Recycle\u003cT\u003e` implements `Deref` and `DerefMut`, and could potentially be\nimplemented for multiple more types, and interact well with `Into` `AsRef`\netc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpc%2Frecycle-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpc%2Frecycle-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpc%2Frecycle-rs/lists"}