Skip to content
quotesby

About this quote

What does it mean?
One could add an attribute to a routine that requests aggressive optimization, with the definition of 'aggressive' being configurable.
In plain terms
Add an attribute to request strong optimization, configurable by the optimizer.
What can you take from it?
Make optimization levels adjustable via metadata.

Where it applies

  • compiler design
  • performance‑critical code

Putting it to work

  • define an @optimize attribute
  • expose aggressiveness as a parameter

Questions to consider

  • How can you expose optimizer parameters safely?
  • What defaults should be used?

Another view

Requires compiler support; not all languages allow it.

More from Larry Wall

  1. The choice of approaches could be made the responsibility of the programmer.

    Permalink to quote #116
  2. If you're going to define a shortcut, then make it the base [sic] darn shortcut you can.

    Permalink to quote #118
  3. You tell it that it's indicative by appending $!. That's why we made $! such a short variable name, after all. :-)

    Permalink to quote #115

Related quotes

  1. It would be possible to optimize some forms of goto, but I haven't bothered.

    Larry WallLarry Wall quote #111
  2. It's hard to tune heavily tuned code. :-)

    Larry WallLarry Wall quote #178
  3. Will the people in the cheaper seats clap your hands? And the rest of you, if you'll just rattle your jewelry.

    John LennonJohn Lennon quote #1