They’re both doing the same thing. If you don’t pass a post ID, get_the_title()
will just use the current post and go about it’s business. The performance difference between passing a postID and not passing a postID is, if anything at all, is extremely minor.