heap.go performance improvement

CF custom test output

initial commit: "Done in 1981" 
this commit: "Done in 1356"