https://github.com/danil/structreflectexample
https://github.com/danil/structreflectexample
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/danil/structreflectexample
- Owner: danil
- License: bsd-3-clause
- Created: 2022-10-26T02:52:30.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-30T10:09:14.000Z (over 3 years ago)
- Last Synced: 2025-02-13T22:37:09.020Z (over 1 year ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Struct reflect example for Go
[](https://cloud.drone.io/danil/structreflectexample)
[](https://pkg.go.dev/github.com/danil/structreflectexample)
Source files are distributed under the BSD-style license.
## About
The software is considered to be at a alpha level of readiness,
its extremely slow and allocates a lots of memory.
## Benchmark
```sh
go test -count=1 -race -bench=. -benchmem ./...
goos: linux
goarch: amd64
pkg: github.com/danil/structreflectexample
cpu: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
BenchmarkReflect/reflect-8 1000000000 0.0000169 ns/op 0 B/op 0 allocs/op
BenchmarkMarshal/marshal-8 1000000000 0.0000176 ns/op 0 B/op 0 allocs/op
PASS
ok github.com/danil/structreflectexample 0.027s
```