Personally I think it's better practice to use a script, since it can be made more flexible. You can switch it on or off, you can pass it variables, etc etc. and it's much easier to read an external script than scroll along a single textbox within the editor interface. Speed of implementation doesn't really come into it.