optimize some operations on Tuple