One way is to create COM DLL component that contains classes and register it on the server (but 99% hosting providers don't allow it) and then create objects (instances of classes) from within the script.
Second way is to create class in ASP script, but it won't run not as near that fast cause it's being interpreted every time.