Reading 1,000,000 ints from raw os.Stdin with fmt.Fscan took ~24s.

Wrapping os.Stdin in a bufio.Reader got it to ~2.2s.

Wrapping os.Stdin in a bufio.Scanner and using strconv.Atoi to parse token strings got it to ~450ms.

Parsing the tokens from bufio.Scanner manually as bytes without string allocations got it to ~280ms.

– From a discussion on the go-nuts mailing list