small optimizations for smiles parser