A Fast and Robust Method for Global Topological Functional Optimization