I am using boost::regex to find a delimiter in a string (in c++) and replace it with a different one if exist:
const boost::regex esc(delimiter);
const std::string rep = "\\\\" + delimiter;
dest += boost::regex_replace(str, esc, rep,
boost::match_default | boost::format_sed);
But when using boost::regex I have a huge decrease in performance (about 50%).
Does anyone know why? Is this a know issue?