Further optimize visitRange by adding and using a "pushall"