in reply to Re^2: How to do regex backreferences within $variable replacement text?
in thread How to do regex backreferences within $variable replacement text?
Compilation time is going to be there no matter what solution you use; something needs to figure out which characters are plain and which are part of the name of a variable to embed, and something much actually do the embedding. True, not some compilers are faster than others, but I suspect that perl is very quick at compiling a string literal, especially since it's already loaded in memory.