{"id":24033749,"url":"https://github.com/daanv2/go-optimal","last_synced_at":"2026-04-02T18:37:23.726Z","repository":{"id":64940504,"uuid":"579619788","full_name":"DaanV2/go-optimal","owner":"DaanV2","description":"A simple, fast, and easy-to-use library for optimally creating and handling data and slices.","archived":false,"fork":false,"pushed_at":"2024-12-28T15:41:08.000Z","size":38,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T18:07:10.106Z","etag":null,"topics":["cache","concurrency","go","golang","mit","optimal","parrallel","slice"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/daanv2/go-optimal","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/DaanV2.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-12-18T10:04:51.000Z","updated_at":"2024-12-28T15:41:01.000Z","dependencies_parsed_at":"2025-01-02T15:02:52.671Z","dependency_job_id":null,"html_url":"https://github.com/DaanV2/go-optimal","commit_stats":null,"previous_names":["daanv2/optimal"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/DaanV2/go-optimal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaanV2%2Fgo-optimal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaanV2%2Fgo-optimal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaanV2%2Fgo-optimal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaanV2%2Fgo-optimal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DaanV2","download_url":"https://codeload.github.com/DaanV2/go-optimal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaanV2%2Fgo-optimal/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263185222,"owners_count":23427141,"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":["cache","concurrency","go","golang","mit","optimal","parrallel","slice"],"created_at":"2025-01-08T18:54:34.104Z","updated_at":"2025-12-25T18:17:18.095Z","avatar_url":"https://github.com/DaanV2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Optimal\n\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/DaanV2/go-optimal)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/DaanV2/go-optimal)\n[![🐹 Golang](https://github.com/daanv2/go-optimal/actions/workflows/go-checks.yml/badge.svg)](https://github.com/daanv2/go-optimal/actions/workflows/go-checks.yml)\n\nA simple, fast, and easy-to-use library for optimally creating and handling data.\n\n```bash\ngo get github.com/daanv2/go-optimal\n```\n\n## Examples\n\n```go\n// SliceSize returns the size that a slice should be to fit in the target cache\nsliceSize := optimal.SliceSize[T]()\n\ncpu.GetCPUInfo()\n\n// These functions will be done in parralel, optimally splitting the work\nparallel.ForEach()\nparallel.Map()\nparallel.All()\n```\n\n## Documentation\n\nThe documentation can be found [go dev](https://pkg.go.dev/github.com/daanv2/go-optimal) or [here](https://github.com/daanv2/go-optimal/tree/main/doc).\n\n# Environment Variables / Settings\n\n| Variable                 | Optional | Documentation                                                                                   |\n| ------------------------ | -------- | ----------------------------------------------------------------------------------------------- |\n| `CPU_CACHE_L1`           | `true`   | Cache L1 size in bytes, When set overrides the scraped value                                    |\n| `CPU_CACHE_L2`           | `true`   | Cache L2 size in bytes, When set overrides the scraped value                                    |\n| `CPU_CACHE_L3`           | `true`   | Cache L3 size in bytes, When set overrides the scraped value                                    |\n| `CPU_CACHE_OPTIMAL_SIZE` | `true`   | Optimal cache size in bytes, When set overrides the scraped value                               |\n| `CPU_CACHE_TARGET`       | `true`   | What type of cache to target, can be L1, L2, L3, anything else and it will determine on its own |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaanv2%2Fgo-optimal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaanv2%2Fgo-optimal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaanv2%2Fgo-optimal/lists"}