Allocation friendly map-handling functions in Dag.