use array

Stack made with array, but significant difference to processing time was
not seen.