https://github.com/mhutter/input-performance
https://github.com/mhutter/input-performance
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mhutter/input-performance
- Owner: mhutter
- Created: 2016-05-27T16:03:01.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-27T16:03:28.000Z (about 10 years ago)
- Last Synced: 2025-03-23T19:17:54.014Z (over 1 year ago)
- Language: Go
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Input Performance Experiment
=============================
I tried to determine the fastest way to read many numbers from stdin.
$ yes 3215649832086464061 | go test -bench .
testing: warning: no tests to run
PASS
BenchmarkScanf-2 2000000 884 ns/op
BenchmarkScan-2 2000000 805 ns/op
BenchmarkBufferedRead-2 3000000 444 ns/op
BenchmarkBufferedScan-2 20000000 77.6 ns/op
ok github.com/mhutter/input-performance 8.572s