In C# you can create a hosted named site collection in C# using the method SPSiteCollection.Add in the overload reported in the link itself.
The two options (with PowerShell too) are described in Host-Named Site Collections (Provisioning by Code and in Specific Content Database).
Considerations about the rights needed from the user (eventually the app pool user with RunWith ElevatedPrivileges) to create site collection can be found in Custom SharePoint 2007 Site Collection Creation Page.
In SharePoint, there can be multiple factors that can affect workflow performance:
- having dedicated history list and task lists, for each workflow
- making sure that in both history lists and task lists there are maximum 2,000 items per folder (eventually create a folder structure);
- respect the boundary of maximum 8k bytes for metadata storage;
- keep ULS log file sizes small
Some interesting links are: