Optimize price::set_ratio_from_string() to speed up market operations