Store the content of the string in a file with a module name (if not there in the code) and compile it using compile module.
Code becomes available in the VM. I am using this technique to convert a configuration file into a module. This way there not much binary copy going on during the execution.