last works by saying "give me the last item from the selection". This requires only two function calls and four lines of code. This cannot be done faster.
filter(':last') , however, is much more complicated. This is a much more flexible system that allows you to return multiple items if you want, or multiple conditions, or a mixture of them. It is much less effective because it has to work out what you want. For example, parsing ':last' takes a little time, while using the last function is a simple property search.
last much more effective.
source share