Costly bat.new/bat.append not optimized out