Optimized Int Reader
As suggested by rolfl you should do Benchmarks on different approaches. This is the only way to tell, if you actually improved on your function.

There are a few points you can improve (or check if they actually improve your case) that I can share from experience:

1) currently you are converting the bytes to string and then you are creating an integer from them. Since you already know there will be integers, use the binary package to do the transformation from bytes directly to integer:

order := binary.LittleEndian
myint := int(order.Uint64(mybyteslice))


Note: this is about 10 times faster than any string/scan operation you can do.

2) Have you checked ReadBytes function of the inputreader? That could probably eliminate your for loop and thus also eliminate the memory allocations you have each time you add an item to mybyteslice.

3) This probably should be the first point because it is the most important: check out the pprof tool to investigate your code. For this you definitly need to write Benchmarks or generate load for your code another way. Then check what takes time in your code and minimize your allocations. Good places to start with pprof are this video and the very good article Debugging performance issues in go making a lot of suggestions.