Spaced repetition is one of the best ways to learn new things.
I'd qualify that with "most efficient", but probably not the most enjoyable, and it doesn't work for learning to understand conceptually complicated or nuanced stuff better. For these reasons, it's better to read three textbooks on the same topic (that use different presentation, and are on different levels of difficulty) than to memorize all the formulas or definitions.
Having just worked through one statistics course with Anki, and having worked through parts of one machine learning and one algorithms course, I disagree. Anki is great for learning conceptually complicated material, because such material tends to be composed of a large number of elements that build on each other. For the more complicated parts to make sense, you need to remember and comprehend all of the less complicated parts that it builds on. Spaced repetition helps ensure you really do remember all of them.
I also find that memorizing various formulas ...
Spaced repetition is one of the most efficient ways to learn new things. (For research citations, see 'Study methods', here.)
The best way to practice spaced repetition is to install Anki to your phone, since you have your phone with you all day long.
I have an Android phone, so here's my 60-second guide to getting started with Anki on Android: