Our logo Kybercode
Home
Archive
Articles
Shared
Bits
About
Contact
Home
Archive Articles Shared Bits

About
Contact
RSS
Topics Authors Privacy Policy
Search
Efficiency Today I Learned
Cooper Gidge on Nov 26, 2024.

Today I learned that print statements cost more than you think. I had a program that needed to perform a calculation...100 million times. I, in my wisdom, had it print what it was doing...100 million times.

When I ran it with print statements, it took over an hour to complete. When I removed the print statements, it took seconds.

It turns out even tiny bits of inefficiency can add up. Who would've guessed?

Comments

There are no comments yet. Be the first to post one!

Leave a Comment

Thank you for posting a comment! It will be reviewed and if it passes our checks, it'll be published.

Replying to

This will be publicly displayed with your comment.

Contribute to the conversation! Markdown supported.

Keep Reading

Previous Not Sure How I Feel About "Was This Helpful?" Widgets

By Cooper Gidge on Nov 29, 2024.

Next Introducing...Bits!

By Cooper Gidge on Nov 26, 2024.

Browse More
The AI Bubble Burst, Just Not In The Way I Was Expecting

By Cooper Gidge on Jan 28, 2025.

Why I Don't Use JavaScript Frameworks

By Cooper Gidge on Jan 19, 2025.

How To Automate Open Graph Images With Eleventy

By Cooper Gidge on Dec 5, 2024.

Featured
Logo Kybercode

All things about software and website development.

RSS
Resources
Home Archive Articles Shared Bits Topics
About
About Contact
Copyright © 2025 Kybercode
Privacy Policy
Home
Archive
Articles
Shared
Bits