use switch only based on heuristics for when that is profitable