When playing from memory, you need to be mentally ahead of what you are playing at all times so that you can plan ahead, be in complete control, anticipate difficulties, and adjust to changing conditions. For example, you can often see a flub coming, and use one of the tricks discussed in this book (see section III.9 on polishing a piece) to get around it. You won't see this flub coming unless you are thinking ahead. One way to practice thinking ahead is to play fast, and then to slow down. By playing fast, you force the brain to think more quickly, so that when you slow down, you are now automatically ahead of the music. You cannot think ahead unless the music is well memorized, so thinking ahead really tests and improves the memory.
You can think ahead on many different levels of complexity. You can think ahead one note when playing very slowly. At faster speeds, you may have to think in terms of bars or phrases. You can also think about themes or musical ideas or different voices or chord transitions. These are all different associations that will help your memory process.
The best way to play very fast, of course, is HS. This is another valuable byproduct of HS practice; you will be surprised at first, what really fast playing will do to your brain. It is a totally new experience. Since you have to go really fast in order to beat the brain, such speeds are not easily attainable HT. Such fast play is a good way to speed up your brain so that it can think ahead.