structslop
structslop is a static analyzer for Go that recommends struct field rearrangements to provide for maximum space/allocation efficiency. (by orijtech)
maligned
Tool to detect Go structs that would take less memory if their fields were sorted. (by mdempsky)
structslop | maligned | |
---|---|---|
5 | 6 | |
795 | 527 | |
0.1% | - | |
3.2 | 0.0 | |
3 months ago | 12 months ago | |
Go | Go | |
Apache License 2.0 | BSD 3-clause "New" or "Revised" License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
structslop
Posts with mentions or reviews of structslop.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-25.
- GitHub - orijtech/structslop: structslop is a static analyzer for Go that recommends struct field rearrangements to provide for maximum space/allocation efficiency.
-
betteralign - structs field alignment static analyzer for Go
I've written betteralign, a tool to detect structs that would use less memory if their fields were sorted and optionally sort such fields. Truth be told, there are a few projects already doing this task perfectly such as fieldalignment, maligned and structslop so you might wonder why should you bother with checking this tool at all. This is a fork of an official Go fieldalignment tool and vast majority of the alignment code has remained the same. There are however some notable changes:
-
Saving a Third of Our Memory by Re-Ordering Go Struct Fields
Go doesnt do this by default, but there are some analyzers that help you do this - https://github.com/orijtech/structslop
- Saving a Third of Our Memory by Re-ordering Go Struct Fields
-
Saving a Third of Our Memory by Re-ordering Go Struct Fields - Qvault
There's a nice tool for these cases, https://github.com/orijtech/structslop
maligned
Posts with mentions or reviews of maligned.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-22.
-
betteralign - structs field alignment static analyzer for Go
I've written betteralign, a tool to detect structs that would use less memory if their fields were sorted and optionally sort such fields. Truth be told, there are a few projects already doing this task perfectly such as fieldalignment, maligned and structslop so you might wonder why should you bother with checking this tool at all. This is a fork of an official Go fieldalignment tool and vast majority of the alignment code has remained the same. There are however some notable changes:
-
Saving a Third of Our Memory by Re-Ordering Go Struct Fields
The standard way to check for these was https://github.com/mdempsky/maligned. It is now deprecated in favour of https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/fie....
You can now check for these using go vet:
go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
- Saving a Third of Our Memory by Re-ordering Go Struct Fields
What are some alternatives?
When comparing structslop and maligned you can also consider the following projects:
bolt
golangci-lint - Fast linters Runner for Go
betteralign - Make your Go programs use less memory (maybe)
go - The Go programming language
goimports - [mirror] Go Tools
traefik - The Cloud Native Application Proxy
rfcs - RFCs for changes to Rust
rclone - "rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files