Branch from dparval to improve memory allocation and garbage collection behavior.