Do you know if using double quotes instead of single quotes in ruby decreases performance in any meaningful way in ruby 1.8 and 1.9.
so if I type
qu
It's certainly possible depending on the implementation, but the scanning portion of the interpreter should only look at each character once. It will need just an additional state (or possible set of states) and transitions to handle #{} blocks.
In a table based scanner thats going to be a single lookup to determine transition, and will be happening for each character anyways.
When the parser gets the scanner output, it's already known that it will have to eval code in the block. So the overhead is only really the memory overhead in the scanner/parser to handle the #{} block, which you pay for either way.
Unless I'm missing something (or misremembering compiler construction details), which is also certainly possible :)