adding timing to anderson solve and a few optimizations