Recursive Function Is Faster Than Loop