Saving 4 bytes per edge
Correct wrong allocation, use std::vector for node array and pass PODs
by value not ref
allocate data in chunks of 8MB
replacing c-style size_t with the one from std namespace