Which one would be more efficient, and why? I'm just getting started with RX and trying to understand how to write better code.
For example I could do
tradesfeed.Where(trade=>trade.Size > 500).Subscribe(x =>
{
Console.WriteLine("big trade: " + x.Symbol + " " + x.Size);
});
tradesfeed.Where(trade=>trade.Size <= 500).Subscribe(x =>
{
Console.WriteLine("little trade: " + x.Symbol + " " + x.Size);
});
or have only one subscription
tradesfeed.Subscribe(x =>
{
if (x.Size > 500)
Console.WriteLine("big trade: " + x.Symbol + " " + x.Size);
else
Console.WriteLine("little trade: " + x.Symbol + " " + x.Size);
});