Following insightful discussion with Eric, I am opening this issue to monitor progress.
At present, there is a noticeable delay in displaying the output because of the computation of logicals that needs to take place. Using sparse matrices will help speed up the performance.