https://github.com/hgfischer/Go-type-assertion-benchmark
Naive performance test of two ways to do type assertion in Go.
https://github.com/hgfischer/Go-type-assertion-benchmark
Last synced: 4 months ago
JSON representation
Naive performance test of two ways to do type assertion in Go.
- Host: GitHub
- URL: https://github.com/hgfischer/Go-type-assertion-benchmark
- Owner: hgfischer
- Created: 2014-06-21T14:51:50.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-02-18T07:14:16.000Z (over 7 years ago)
- Last Synced: 2024-11-16T23:32:39.148Z (8 months ago)
- Language: Go
- Size: 145 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
Naive performance test of doing type assertion using:
* The static way
or...
* Using reflection to avoid code repetition
# Results
```
BenchmarkAppendNativeTypeAssertion 5000000 666 ns/op
BenchmarkAppendReflectionTypeAssertion 5000000 529 ns/op
```# Thanks to
* Dan Kortschak
* Dmitry Vyukov
* Xingtao Zhao
* Egon
* Chris Dollin