improvements: individual array sizes, tail recursive sizeof and better output
map of identityHashCode replaced by java.util.IdentityHashMap