Currently the cache for compiled script classes is per global, i.e. other threads/globals will have to recompile the script. I think this is because of PropertyMaps in the static constants array of script classes used to have a reference to the prototype object. This isn't the case anymore, but there may still be problems with sharing maps unless they are duplicated for each global.
We should find out and share the class cache among globals if possible.