borokov
@borokov@lemmy.world
- Comment on Vaultwarden selfhosting, or bitwarden service? 3 days ago:
Maybe worth to mention that bitwarden also propose bitwarden.eu to host data in Europe. I’ve used bitwarden.com for years, and switch to bitwarden.eu a few month ago because of reasons, you know…
- Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len() 2 weeks ago:
I comment because this is how a social network works, and this is how you keep lemmy alive. My comment has generated a dozen of other comments, so he achieved his goal.
There is not a single question that’s already have been answered on internet, so there no point on asking anything on social plateforms except just for the sake of interacting with other peoples.
Lemmy is not stackoverflow 😉
- Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len() 2 weeks ago:
Don’t know how list are implemented in Python. But in the dumb linked list implementation (like C++ std::list), each element has a “next” member that point the the next element. So, to have list length, you have to do (pseudo code, not actual python code):
len = 0 elt = list.fisrt while exist(elt): elt = elt.next len++ return len
Whereas to test if list is empty, you just have to:
return exist(list.first)
- Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len() 2 weeks ago:
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.
- Comment on Nearly half of Steam's users are still using Windows 10, with end of life fast approaching 2 months ago:
I use to be on Windows 7 until last month, where Steam definitly refuse to start. Now I’ve switch to Ubuntu. No regret.