{"id":50626,"date":"2026-01-05T17:18:17","date_gmt":"2026-01-05T22:18:17","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=50626"},"modified":"2026-01-05T17:18:17","modified_gmt":"2026-01-05T22:18:17","slug":"python-numbers-every-programmer-should-know","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2026\/01\/05\/python-numbers-every-programmer-should-know\/","title":{"rendered":"Python Numbers Every Programmer Should Know"},"content":{"rendered":"<p><a href=\"https:\/\/mkennedy.codes\/posts\/python-numbers-every-programmer-should-know\/\">Michael Kennedy<\/a> (via <a href=\"https:\/\/news.ycombinator.com\/item?id=46454470\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/mkennedy.codes\/posts\/python-numbers-every-programmer-should-know\/\">\n<p>For example, how fast or slow is it to add an item to a list in Python? What about opening a file? Is that less than a millisecond? Is there something that makes that slower than you might have guessed? If you have a performance sensitive algorithm, which data structure should you use? How much memory does a floating point number use? What about a single character or the empty string? How fast is FastAPI compared to Django?<\/p>\n<p>I wanted to take a moment and write down performance numbers specifically focused on Python developers. Below you will find an extensive table of such values.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/01\/05\/latency-numbers-every-programmer-should-know\/\">Latency Numbers Every Programmer Should Know<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2018\/05\/10\/c-is-not-a-low-level-language\/\">C Is Not a Low-level Language<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2016\/04\/21\/performance-comparisons-of-common-operations-2016-edition\/\">Performance Comparisons of Common Operations, 2016 Edition<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Michael Kennedy (via Hacker News): For example, how fast or slow is it to add an item to a list in Python? What about opening a file? Is that less than a millisecond? Is there something that makes that slower than you might have guessed? If you have a performance sensitive algorithm, which data structure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2026-01-05T22:18:20Z","apple_news_api_id":"f2b12e65-465f-4106-ade4-656773650a97","apple_news_api_modified_at":"2026-01-05T22:18:21Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/A8rEuZUZfQQat5GVnc2UKlw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[571,138,71,232],"class_list":["post-50626","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-memory-management","tag-optimization","tag-programming","tag-python"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/50626","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=50626"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/50626\/revisions"}],"predecessor-version":[{"id":50627,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/50626\/revisions\/50627"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=50626"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=50626"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=50626"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}