---
title: "Meaning & Key Takeaway of: Code should run as fast as necessary, but…"
description: "\"Code should run as fast as necessary, but no faster; something important is always traded away to increase speed.\" — Richard E. Pattis"
image: "https://sms4smile.com/quotes/i/de1/richard-e-pattis-41876_code_code-should-run-as-fast-as-necessary-but_666245.png"
---

#  Code should run as fast as necessary, but no faster…

![“Code should run as fast as necessary, but no faster; something important is always traded away to increase speed.” quote by Richard E. Pattis](https://sms4smile.com/quotes/i/de1/richard-e-pattis-41876_code_code-should-run-as-fast-as-necessary-but_666245.png)   [Download](https://sms4smile.com/quotes/i/de1/richard-e-pattis-41876_code_code-should-run-as-fast-as-necessary-but_666245.png) [Open image](https://sms4smile.com/quotes/i/de1/richard-e-pattis-41876_code_code-should-run-as-fast-as-necessary-but_666245.png)

> “Code should run as fast as necessary, but no faster; something important is always traded away to increase speed.”

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

## About This Quote

This interpretation was drafted with AI assistance. It is one reading of the quote, not the author's own explanation.

Speed improvements often sacrifice other important qualities such as correctness, readability, or maintainability.

**In simple terms:** Fast code can cost other values.

Key Takeaway

Balance speed with other priorities.

Themes

performance trade-offs software engineering

Mood

pragmatic cautious

Type

technical advisory

When to use this quote

- real‑time systems
- high‑frequency trading
- embedded devices
- large‑scale data processing

Key Concepts

algorithmic efficiency software quality

Questions to Reflect On

- What aspects are you willing to compromise for speed?
- How can you measure the true cost of faster code?

A Different Perspective

Pursuing speed alone may cause bugs or technical debt.

★ ★ ★ ★ ★   No ratings yet

[Code](https://sms4smile.com/quotes/about/code/) [Computer language](https://sms4smile.com/quotes/about/computer-language/) [Computer programming](https://sms4smile.com/quotes/about/computer-programming/) [Learning](https://sms4smile.com/quotes/about/learning/) [Programming](https://sms4smile.com/quotes/about/programming/) [Programming languages](https://sms4smile.com/quotes/about/programming-languages/) [Running](https://sms4smile.com/quotes/about/running/) [Speed](https://sms4smile.com/quotes/about/speed/) [Technology](https://sms4smile.com/quotes/about/technology/)

## Related quotes

> [If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it.](https://sms4smile.com/quotes/richard-e-pattis/if-you-cannot-grok-the-overall-structure-of-a-program-while-taking-a/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [The structure of a software system provides the ecology in which code is born, matures, and dies. A well-designed habitat allows for the successful…](https://sms4smile.com/quotes/richard-e-pattis/the-structure-of-a-software-system-provides-the-ecology-in-which-code/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [When teaching a rapidly changing technology, perspective is more important than content.](https://sms4smile.com/quotes/richard-e-pattis/when-teaching-a-rapidly-changing-technology-perspective-is-more/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [The discipline of programming is most like sorcery. Both use precise language to instruct inanimate objects to do our bidding. Small mistakes in programs…](https://sms4smile.com/quotes/richard-e-pattis/the-discipline-of-programming-is-most-like-sorcery-both-use-precise/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [When debugging, novices insert corrective code; experts remove defective code.](https://sms4smile.com/quotes/richard-e-pattis/when-debugging-novices-insert-corrective-code-experts-remove/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [A class, in Java, is where we teach objects how to behave.](https://sms4smile.com/quotes/richard-e-pattis/a-class-in-java-is-where-we-teach-objects-how-to-behave/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [When building a complex system, having crackerjack programmers (who can make any design work, even a bad one) can be a liability. The result,…](https://sms4smile.com/quotes/richard-e-pattis/when-building-a-complex-system-having-crackerjack-programmers-who-can/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [Programming languages, like pizzas, come in only too sizes; too big and too small.](https://sms4smile.com/quotes/richard-e-pattis/programming-languages-like-pizzas-come-in-only-too-sizes-too-big-and/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [The three most important aspects of debugging and real estate are the same: Location, Location, and Location.](https://sms4smile.com/quotes/richard-e-pattis/the-three-most-important-aspects-of-debugging-and-real-estate-are-the/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [Computer Science is the only discipline in which we view adding a new wing to a building as being maintenance.](https://sms4smile.com/quotes/jim-horning/computer-science-is-the-only-discipline-in-which-we-view-adding-a-new/)

[Jim Horning](https://sms4smile.com/quotes/author/jim-horning/)

> [A teacher's job is to take a bunch of live wires and see that they are well-grounded.](https://sms4smile.com/quotes/darwin-d-martin/a-teacher-s-job-is-to-take-a-bunch-of-live-wires-and-see-that-they/)

Darwin D. Martin

> [When certain concepts of TeX are introduced informally, general rules will be stated; afterwards you will find that the rules aren't strictly true. In…](https://sms4smile.com/quotes/donald-knuth/when-certain-concepts-of-tex-are-introduced-informally-general-rules/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [The generation of random numbers is too important to be left to chance.](https://sms4smile.com/quotes/robert-coveyou/the-generation-of-random-numbers-is-too-important-to-be-left-to-chance/)

Robert Coveyou

> [Beauty is more important in computing than anywhere else in technology because software is so complicated. Beauty is the ultimate defense against complexity.](https://sms4smile.com/quotes/david-gelernter/beauty-is-more-important-in-computing-than-anywhere-else-in/)

[David Gelernter](https://sms4smile.com/quotes/author/david-gelernter/)

> [I think that it's extraordinarily important that we in computer science keep fun in computing. When it started out, it was an awful lot…](https://sms4smile.com/quotes/alan-perlis/i-think-that-it-s-extraordinarily-important-that-we-in-computer/)

[Alan Perlis](https://sms4smile.com/quotes/author/alan-perlis/)

## More by Richard E. Pattis

> [If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it.](https://sms4smile.com/quotes/richard-e-pattis/if-you-cannot-grok-the-overall-structure-of-a-program-while-taking-a/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [Programming languages, like pizzas, come in only too sizes; too big and too small.](https://sms4smile.com/quotes/richard-e-pattis/programming-languages-like-pizzas-come-in-only-too-sizes-too-big-and/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [When building a complex system, having crackerjack programmers (who can make any design work, even a bad one) can be a liability. The result,…](https://sms4smile.com/quotes/richard-e-pattis/when-building-a-complex-system-having-crackerjack-programmers-who-can/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [A class, in Java, is where we teach objects how to behave.](https://sms4smile.com/quotes/richard-e-pattis/a-class-in-java-is-where-we-teach-objects-how-to-behave/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [When debugging, novices insert corrective code; experts remove defective code.](https://sms4smile.com/quotes/richard-e-pattis/when-debugging-novices-insert-corrective-code-experts-remove/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [The discipline of programming is most like sorcery. Both use precise language to instruct inanimate objects to do our bidding. Small mistakes in programs…](https://sms4smile.com/quotes/richard-e-pattis/the-discipline-of-programming-is-most-like-sorcery-both-use-precise/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [When teaching a rapidly changing technology, perspective is more important than content.](https://sms4smile.com/quotes/richard-e-pattis/when-teaching-a-rapidly-changing-technology-perspective-is-more/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [The structure of a software system provides the ecology in which code is born, matures, and dies. A well-designed habitat allows for the successful…](https://sms4smile.com/quotes/richard-e-pattis/the-structure-of-a-software-system-provides-the-ecology-in-which-code/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

> [The three most important aspects of debugging and real estate are the same: Location, Location, and Location.](https://sms4smile.com/quotes/richard-e-pattis/the-three-most-important-aspects-of-debugging-and-real-estate-are-the/)

[Richard E. Pattis](https://sms4smile.com/quotes/author/richard-e-pattis/)

[Explore all 10 Richard E. Pattis quotes ](https://sms4smile.com/quotes/author/richard-e-pattis/)

## More Code quotes

> [At the deepest level, all living things that have ever been looked at have the same DNA code. And many of the same genes.](https://sms4smile.com/quotes/richard-dawkins/at-the-deepest-level-all-living-things-that-have-ever-been-looked-at/)

[Richard Dawkins](https://sms4smile.com/quotes/author/richard-dawkins/)

> [It is no secret that I have read 'The Da Vinci Code' several times. I genuinely believe that 'The Da Vinci Code' and 'Angels…](https://sms4smile.com/quotes/ashwin-sanghi/it-is-no-secret-that-i-have-read-the-da-vinci-code-several-times-i/)

[Ashwin Sanghi](https://sms4smile.com/quotes/author/ashwin-sanghi/)

> [Programmers are always surrounded by complexity; we cannot avoid it… If our basic tool, the language in which we design and code our programs,…](https://sms4smile.com/quotes/tony-hoare/programmers-are-always-surrounded-by-complexity-we-cannot-avoid-it-if/)

[Tony Hoare](https://sms4smile.com/quotes/author/tony-hoare/)

> [One of my most productive days was throwing away 1,000 lines of code.](https://sms4smile.com/quotes/ken-thompson/one-of-my-most-productive-days-was-throwing-away-1-000-lines-of-code/)

[Ken Thompson](https://sms4smile.com/quotes/author/ken-thompson/)

> [Writing code means always having to say you're sorry.](https://sms4smile.com/quotes/paul-ford/writing-code-means-always-having-to-say-you-re-sorry/)

[Paul Ford](https://sms4smile.com/quotes/author/paul-ford/)

> [It would be a piece of ingenuousness to accuse the man of today of his lack of moral code. The accusation would leave him…](https://sms4smile.com/quotes/jose-ortega-y-gasset/it-would-be-a-piece-of-ingenuousness-to-accuse-the-man-of-today-of/)

[Jose Ortega y Gasset](https://sms4smile.com/quotes/author/jose-ortega-y-gasset/)

> [I loved 'Chicago Code;' I watched that a lot. It was great because it really captured the city - I'm from Chicago, too.](https://sms4smile.com/quotes/jessy-schram/i-loved-chicago-code-i-watched-that-a-lot-it-was-great-because-it/)

[Jessy Schram](https://sms4smile.com/quotes/author/jessy-schram/)

> [I kind of pride myself on coming onto things that are well-oiled machines and finding a way to bring what I bring and fit…](https://sms4smile.com/quotes/rob-lowe/i-kind-of-pride-myself-on-coming-onto-things-that-are-well-oiled/)

[Rob Lowe](https://sms4smile.com/quotes/author/rob-lowe/)

> [When we're done simplifying the tax code, getting the lobbyist carve outs our of the tax code, lowering our rates and letting people have…](https://sms4smile.com/quotes/paul-ryan/when-we-re-done-simplifying-the-tax-code-getting-the-lobbyist-carve/)

[Paul Ryan](https://sms4smile.com/quotes/author/paul-ryan/)

> [The tax code is 10 times the size of the Bible with none of the good news.](https://sms4smile.com/quotes/paul-ryan/the-tax-code-is-10-times-the-size-of-the-bible-with-none-of-the-good/)

[Paul Ryan](https://sms4smile.com/quotes/author/paul-ryan/)

> [The Cheney team had, for example, technological supremacy over the National Security Council staff. That is to say, they could read their e-mails. I…](https://sms4smile.com/quotes/lawrence-wilkerson/the-cheney-team-had-for-example-technological-supremacy-over-the/)

[Lawrence Wilkerson](https://sms4smile.com/quotes/author/lawrence-wilkerson/)

> [ \[T\]he tax code has been piling up, year after year, a symbol of everything gone wrong in America, of arrogant rulers and lost freedom,… ](https://sms4smile.com/quotes/dick-armey/t-he-tax-code-has-been-piling-up-year-after-year-a-symbol-of/)

[Dick Armey](https://sms4smile.com/quotes/author/dick-armey/)

> [In open source, you really have to be near the watershed to have an impact on the source code. Customers want to be near…](https://sms4smile.com/quotes/peter-fenton/in-open-source-you-really-have-to-be-near-the-watershed-to-have-an/)

[Peter Fenton](https://sms4smile.com/quotes/author/peter-fenton/)

> [We can use our art to become political, to become something you want to talk about. We make clothes, but we have the chance…](https://sms4smile.com/quotes/olivier-rousteing/we-can-use-our-art-to-become-political-to-become-something-you-want/)

[Olivier Rousteing](https://sms4smile.com/quotes/author/olivier-rousteing/)

> [Your zip code or your income level should not dictate your access to healthy drinking water.](https://sms4smile.com/quotes/alex-padilla/your-zip-code-or-your-income-level-should-not-dictate-your-access-to/)

[Alex Padilla](https://sms4smile.com/quotes/author/alex-padilla/)

[Browse all 1,662 Code quotes ](https://sms4smile.com/quotes/about/code/)

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Quotation",
            "text": "Code should run as fast as necessary, but no faster; something important is always traded away to increase speed.",
            "creator": {
                "@type": "Person",
                "name": "Richard E. Pattis"
            },
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "url": "https://sms4smile.com/quotes/richard-e-pattis/code-should-run-as-fast-as-necessary-but-no-faster-something/",
            "about": {
                "@type": "Thing",
                "name": "Code"
            },
            "@id": "https://sms4smile.com/quotes/richard-e-pattis/code-should-run-as-fast-as-necessary-but-no-faster-something/#quotation",
            "image": {
                "@type": "ImageObject",
                "@id": "https://sms4smile.com/quotes/i/de1/richard-e-pattis-41876_code_code-should-run-as-fast-as-necessary-but_666245.png",
                "contentUrl": "https://sms4smile.com/quotes/i/de1/richard-e-pattis-41876_code_code-should-run-as-fast-as-necessary-but_666245.png",
                "url": "https://sms4smile.com/quotes/i/de1/richard-e-pattis-41876_code_code-should-run-as-fast-as-necessary-but_666245.png",
                "width": 1080,
                "height": 1080,
                "caption": "“Code should run as fast as necessary, but no faster; something important is always traded away to increase…” — Richard E. Pattis",
                "creditText": "SMS4Smile Quotes",
                "creator": {
                    "@id": "https://sms4smile.com/quotes/#organization"
                }
            }
        },
        {
            "@type": "BreadcrumbList",
            "itemListElement": [
                {
                    "@type": "ListItem",
                    "position": 1,
                    "name": "Home",
                    "item": "https://sms4smile.com/"
                },
                {
                    "@type": "ListItem",
                    "position": 2,
                    "name": "Quotes",
                    "item": "https://sms4smile.com/quotes/"
                },
                {
                    "@type": "ListItem",
                    "position": 3,
                    "name": "Richard E. Pattis",
                    "item": "https://sms4smile.com/quotes/author/richard-e-pattis/"
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "name": "Code should run as fast as...",
                    "item": "https://sms4smile.com/quotes/richard-e-pattis/code-should-run-as-fast-as-necessary-but-no-faster-something/"
                }
            ],
            "@id": "https://sms4smile.com/quotes/richard-e-pattis/code-should-run-as-fast-as-necessary-but-no-faster-something/#breadcrumb"
        },
        {
            "@type": "WebSite",
            "@id": "https://sms4smile.com/quotes/#website",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "publisher": {
                "@id": "https://sms4smile.com/quotes/#organization"
            }
        },
        {
            "@type": "Organization",
            "@id": "https://sms4smile.com/quotes/#organization",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "logo": {
                "@type": "ImageObject",
                "url": "https://sms4smile.com/quotes/wp-content/themes/sq/assets/icons/icon-512.png",
                "width": 512,
                "height": 512
            }
        }
    ]
}
```
