Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 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 (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-02-18T07:14:16.000Z (almost 7 years ago)
- Last Synced: 2024-10-25T07:11:22.975Z (4 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
- awesome-go - go-type-assertion-benchmark - Naive performance test of two ways to do type assertion in Go. - ★ 5 (Benchmarks)
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