As I understand it, there's two parts to this:
- Initialisation of the AS environment
- Compilation of the script that is then run in that environment
Initialisation of the environment should be relatively constant, and is out of our control. Compilation time will vary depending on the size of the script, and the proportion of the KM action's execution time that is spent on compilation will also depend on how long the AS takes to execute.
IMO (and I haven't tested properly), for the vast majority of scripts the time saved by pre-compiling will be negligible compared to the total execution time of the action -- and is often negated by the extra time you have to spend in the first place and when editing later.
But @noisneil looked into this a lot more, and might chime in later.