unboiled.info
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS Bot@lemmy.bestiver.seMB to Lobste.rs@lemmy.bestiver.seEnglish · 5 months ago

Python Performance: Why 'if not list' is 2x Faster Than Using len()

blog.codingconfessions.com

external-link
message-square
0
link
fedilink
  • cross-posted to:
  • python@programming.dev
  • technology@lemmy.world
3
external-link

Python Performance: Why 'if not list' is 2x Faster Than Using len()

blog.codingconfessions.com

RSS Bot@lemmy.bestiver.seMB to Lobste.rs@lemmy.bestiver.seEnglish · 5 months ago
message-square
0
link
fedilink
  • cross-posted to:
  • python@programming.dev
  • technology@lemmy.world
Discover why 'if not mylist' is twice as fast as 'len(mylist) == 0' by examining CPython's VM instructions and object memory access patterns.

Comments

alert-triangle
You must log in or # to comment.

Lobste.rs@lemmy.bestiver.se

lobsters@lemmy.bestiver.se

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !lobsters@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

RSS Feed of lobste.rs

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 26 users / day
  • 122 users / week
  • 383 users / month
  • 1.25K users / 6 months
  • 1 local subscriber
  • 247 subscribers
  • 5.48K Posts
  • 292 Comments
  • Modlog
  • mods:
  • patrick@lemmy.bestiver.se
  • RSS Bot@lemmy.bestiver.se
  • UI: unknown version
  • BE: 0.19.12
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org