Performance tuning: reduce the number of s:parse_options calls