How does the algorithm work?
-
Pick a cell at random and mark it as visited
-
Pick a neighbor at random
-
If visited, move to the new cell
-
If not visited, move to the new cell removing the gate
-
Keep picking a neighbor until every cell has been visited
-
Do not create any exit
Doesn't sound that efficient
And it most likely isn't. The goal is to have an unbiased algorithm, but this comes at the price of a slow runtime.
More refined algorithms try to fix the inevitable repetition with a constrained walk.