according to this article, WCF with named pipes is the best choice for IPC, and it is around 25 % faster than .Net Remoting.
I have the following code that compares WCF
If, in addition to SSamra's code, you move the creation of your host outside of your WCF test (since, in my opinion you should only be creating the host just once) you can get even faster responses:
static void Main(string[] args)
{
var address = "net.pipe://localhost/test";
host = new ServiceHost(typeof(Remote));
host.AddServiceEndpoint(typeof(IRemote), new NetNamedPipeBinding(NetNamedPipeSecurityMode.None), address);
host.Open();
proxy = ChannelFactory.CreateChannel(new NetNamedPipeBinding(NetNamedPipeSecurityMode.None), new EndpointAddress(address));
TestWcf(Iterations);
TestRemoting(Iterations);
TestWcf(Iterations);
TestRemoting(Iterations);
TestWcf(Iterations);
TestRemoting(Iterations);
host.Close();
Console.ReadKey();
}
Responses:
This shows that, when configured like this, WCF in process is significantly faster than .Net remoting!