Speed optimization to GromacsTopFile