Now update the write phase to use `write_entries_from_sorted` for ways instead of the hash-map version:


1908:                return write_entries(output_dir + "/street_entries.bin", sorted_geo_cells, data.cell_to_ways);


Edit

return write_entries(output_dir + "/street_entries.bin", sorted_geo_cells, data.cell_to_ways);

                // Use direct sorted-pair writing for ways (skips hash map extraction + sort)
                if (!data.sorted_way_cells.empty()) {
                    return write_entries_from_sorted(output_dir + "/street_entries.bin", sorted_geo_cells, data.sorted_way_cells);
                }
                return write_entries(output_dir + "/street_entries.bin", sorted_geo_cells, data.cell_to_ways);