Various script languages, like Ruby, Lua and Python, are also used for the generation of content such as gameplay and especially AI. Scripts are generally parsed at load time (when the game or level is loaded into main memory) and then executed at runtime (via logic branches or other such mechanisms). They are generally not executed by an interpreter, which would result in much slower execution. Scripts tend to be used selectively, often for AI and high-level game logic. Some games are designed with high dependency on scripts and some scripts are compiled to binary format before game execution. In the optimization phase of development, some script functions will often be rewritten in a compiled language.