This is a most excellent place for technology news and articles.
Isn't it because list is linked list, so to get the Len it has to iterate over the whole list whereas to get emptyness it just have to check if there is a 1st element ?
I' too lazy to read the article BTW.
So… it has to iterate over the whole empty list is what you’re saying? like once for every of the zero items in the list?
The list is not necessarily empty. If you were sure it was, why check?
Isn't it because list is linked list, so to get the Len it has to iterate over the whole list whereas to get emptyness it just have to check if there is a 1st element ?
I' too lazy to read the article BTW.
So… it has to iterate over the whole empty list is what you’re saying? like once for every of the zero items in the list?
The list is not necessarily empty. If you were sure it was, why check?