Hello,
Performance will depend on what exactly you are doing - most of the cost comes from calling Lua functions in GameMaker and calling GameMaker functions in Lua (crossing the GameMaker/Lua border).
If you know how to use Visual Studio, you can compile the new version of Apollo - that is as fast as this currently can be, I believe.
Lua does not have a way to clear states (or even metatables) in general, but you probably shouldn’t create a new state for every instance - usually games use one state per mod. Something like this, for example:
function onCreate(gml_instance)
--
end
function onStep(gml_instance)
--
end
-- ...