{"id":19865928,"url":"https://github.com/go-perf/go-perftuner","last_synced_at":"2026-03-09T23:02:38.447Z","repository":{"id":44756198,"uuid":"179349883","full_name":"go-perf/go-perftuner","owner":"go-perf","description":"Helper tool for manual Go code optimization.","archived":false,"fork":false,"pushed_at":"2025-03-19T10:49:44.000Z","size":71,"stargazers_count":130,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-26T08:49:39.053Z","etag":null,"topics":["benchmark","cli","command-line","go","golang","performance"],"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/go-perf.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}},"created_at":"2019-04-03T18:45:26.000Z","updated_at":"2025-03-31T18:12:57.000Z","dependencies_parsed_at":"2023-12-03T11:20:43.007Z","dependency_job_id":"75707e33-fa2f-484b-9b43-e1580510ceab","html_url":"https://github.com/go-perf/go-perftuner","commit_stats":null,"previous_names":["cristaloleg/go-perftuner"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-perf%2Fgo-perftuner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-perf%2Fgo-perftuner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-perf%2Fgo-perftuner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-perf%2Fgo-perftuner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-perf","download_url":"https://codeload.github.com/go-perf/go-perftuner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251992993,"owners_count":21677022,"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":["benchmark","cli","command-line","go","golang","performance"],"created_at":"2024-11-12T15:24:32.336Z","updated_at":"2025-12-15T01:12:44.497Z","avatar_url":"https://github.com/go-perf.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# go-perftuner\n\n[![build-img]][build-url]\n[![pkg-img]][pkg-url]\n[![reportcard-img]][reportcard-url]\n\nHelper tool for manual Go code optimization.\n\nThis tool gives you an easy way to get the Go compiler output regarding specific optimisations. Like: function inlining, variable escape and bounds checks.\n\n# Notes\n\nThe original implementation was started by [@quasilyte](https://github.com/quasilyte) thanks to him :tada: Than supported by [@cristaloleg](https://github.com/cristaloleg) and now is part of [go-perf](https://github.com/go-perf) organization.\n\n# Installation / Quick Start\n\n```bash\n# Install go-perftuner:\n$ go install github.com/go-perf/go-perftuner@latest\n\n# Check installation (prints help):\n$ go-perftuner help\n\n# Run almostInlined sub-command on strings and bytes package:\n$ go-perftuner almostInlined strings bytes\n\n# You can use \"std\" or \"...\" package name.\n# These follow \"go build\" conventions.\n$ go-perftuner almostInlined std\n```\n\n# Sub-commands\n\n## almostInlined\n\nFind functions that cross inlining threshold just barely. You may use short command `inl`.\n\n```bash\n$ go-perftuner almostInlined -threshold=1 std\nalmostInlined: std: src/strconv/atof.go:371:6: atof64exact: budget exceeded by 1\nalmostInlined: std: src/strconv/atof.go:405:6: atof32exact: budget exceeded by 1\nalmostInlined: std: src/reflect/value.go:1199:6: Value.OverflowComplex: budget exceeded by 1\nalmostInlined: std: src/vendor/golang_org/x/crypto/cryptobyte/builder.go:77:6: (*Builder).AddUint16: budget exceeded by 1\nalmostInlined: std: src/crypto/x509/x509.go:1858:58: buildExtensions.func2.1.1: budget exceeded by 1\nalmostInlined: std: src/crypto/x509/x509.go:1878:58: buildExtensions.func2.3.1: budget exceeded by 1\nalmostInlined: std: src/crypto/x509/x509.go:1890:58: buildExtensions.func2.4.1: budget exceeded by 1\nalmostInlined: std: src/crypto/tls/handshake_messages.go:1450:6: (*newSessionTicketMsg).marshal: budget exceeded by 1\nalmostInlined: std: src/net/http/transfer.go:259:6: (*transferWriter).shouldSendContentLength: budget exceeded by 1\n```\n\n## escapedVariables\n\nFind variables that are escaped to the heap. You may use short command `esc`.\n\n```bash\n$ go-perftuner escapedVariables fmt\nescapedVariables: fmt: src/fmt/format.go:73:13: make(buffer, cap(buf) * 2 + n)\nescapedVariables: fmt: src/fmt/format.go:147:14: make([]byte, width)\nescapedVariables: fmt: src/fmt/format.go:208:14: make([]byte, width)\n```\n\n## boundChecks\n\nFind slice/array that has bound check. You may use short command `bce`.\n\n```bash\n$ go-perftuner boundChecks fmt\nboundChecks: fmt: src/fmt/format.go:82:16: slice/array has bound checks\nboundChecks: fmt: src/fmt/format.go:157:10: slice/array has bound checks\nboundChecks: fmt: src/fmt/format.go:159:22: slice/array has bound checks\nboundChecks: fmt: src/fmt/format.go:161:10: slice/array has bound checks\n```\n\n## License\n\n[MIT License](LICENSE).\n\n[build-img]: https://github.com/go-perf/go-perftuner/workflows/build/badge.svg\n[build-url]: https://github.com/go-perf/go-perftuner/actions\n[pkg-img]: https://pkg.go.dev/badge/go-perf/go-perftuner\n[pkg-url]: https://pkg.go.dev/github.com/go-perf/go-perftuner\n[reportcard-img]: https://goreportcard.com/badge/go-perf/go-perftuner\n[reportcard-url]: https://goreportcard.com/report/go-perf/go-perftuner\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-perf%2Fgo-perftuner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-perf%2Fgo-perftuner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-perf%2Fgo-perftuner/lists"}