{"id":18986045,"url":"https://github.com/deanpdx/struct-benchmarks","last_synced_at":"2025-06-15T20:32:48.188Z","repository":{"id":229859381,"uuid":"777833931","full_name":"DeanPDX/struct-benchmarks","owner":"DeanPDX","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-26T15:50:53.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T10:16:24.841Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/DeanPDX.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}},"created_at":"2024-03-26T15:33:16.000Z","updated_at":"2024-03-26T15:50:57.000Z","dependencies_parsed_at":"2024-03-26T16:57:23.208Z","dependency_job_id":"e471abed-10d8-4777-8931-1d3bc008c1f1","html_url":"https://github.com/DeanPDX/struct-benchmarks","commit_stats":null,"previous_names":["deanpdx/struct-benchmarks"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DeanPDX/struct-benchmarks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeanPDX%2Fstruct-benchmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeanPDX%2Fstruct-benchmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeanPDX%2Fstruct-benchmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeanPDX%2Fstruct-benchmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeanPDX","download_url":"https://codeload.github.com/DeanPDX/struct-benchmarks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeanPDX%2Fstruct-benchmarks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260046048,"owners_count":22950797,"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-11-08T16:29:21.436Z","updated_at":"2025-06-15T20:32:48.161Z","avatar_url":"https://github.com/DeanPDX.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Struct Benchmarks\nThis is a contrived benchmark to illustrate differences between iterating over an array of type `[]T` and `[]*T` and how much it matters if we `range` over them versus index into them. See [this thread](https://forum.golangbridge.org/t/can-someone-kindly-eli5-the-difference-between-using-slice-of-pointers-and-slice-of-structs/34905) for more details.\n\n## Running the benchmarks\nAfter cloning the repository, `go test -bench .` should yield something like this:\n\n```bash\ngoos: windows\ngoarch: amd64\npkg: github.com/DeanPDX/struct-benchmarks\ncpu: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz\nBenchmarkRangePointers-8          654621              1839 ns/op\nBenchmarkRangeStructs-8           499588              2332 ns/op\nBenchmarkIndexPointers-8          704833              1732 ns/op\nBenchmarkIndexStructs-8           666658              1844 ns/op\nPASS\nok      github.com/DeanPDX/struct-benchmarks    5.002s\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanpdx%2Fstruct-benchmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeanpdx%2Fstruct-benchmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanpdx%2Fstruct-benchmarks/lists"}