Launches
Coming soon
Upcoming launches to watch
Launch archive
Most-loved launches by the community
Launch Guide
Checklists and pro tips for launching
Products
News
Newsletter
The best of Product Hunt, every day
Stories
Tech news, interviews, and tips from makers
Changelog
New Product Hunt features and releases
Forums
Forums
Ask questions, find support, and connect
Streaks
The most active community members
Events
Meet others online and in-person
Advertise
Subscribe
Sign in
Start new thread
All
Topics
p/general
p/ama
p/introduce-yourself
p/self-promotion
Product Forums
p/cal
p/claude
p/cursor
p/deepgram
p/dub
p/elevenlabs
p/figma
p/linear
p/notion
p/posthog
p/raycast
p/replit
p/supabase
p/tana
p/vercel
p/voicenotes
p/popular-javascript-interview-questions
Free ebook Most popular Javascript interview questions
Visit Product
Follow
Loops in Python Comparison & Performance — Compare python loops and verify their performance in ms.
Anna Danilec
1
•
4yr ago
This article compares the performance of several approaches when summing two sequences element-wise:
-Using the while loop
-Using the for loop
-Using the for loop with list comprehensions
-Using the third-party library numpy
See launch →
1
4
Login to comment
Replies
Best
Anna Danilec
Maker
However, performance isn’t the only concern when developing software. Moreover, according to Donald Knuth in The Art of Computer Programming, “premature optimization is the root of all evil (or at least most of it) in programming”.
Upvote
(1)
Report
Share
4yr ago