Faster way to get number from string