Optimize str parsing.