Efficient Computation Of Persistent Homology For Cubical Data