This is a single thread, so you can use ArrayList, which will be slightly faster.