Optimization
2000-01-01
Optimization is good. The hardware I own usually is some years behind the newest one available at the time, so that alone makes me appreciate when something has as much raw performance as possible. There just is no good reason to make something use up more resources than it needs. Why waste CPU cycles to make it run 10 times slower, if you can optimize to make it run twice as fast? Why use twice as much memory as needed, when you can optimize to use only half as much?Optimization is bad. It takes a lot of time better spent on implementing and improving the rest of your program, and the result is code which is hard or impossible to understand or modify, which is less robust, and maybe even has some subtle bugs. Why do something in a convoluted and complicated way, just to save some extra checks or a few bytes of memory here and there?
So, there, that's my opinion on optimization.
Put in a different way, there is no clear yes or no answer. There's always trade offs. The first one, it simple takes time to optimize working code. But of course, if you can make the code work better, and maybe even easier to understand, then it's good to take the time to optimize it. Another trade off maybe, you can either optimize for size or speed, or something else. Such other thing may be robustness, correctness, or code readability. E.g. you could write something in C/C++ instead of Python - but is it really worth transfering your working code to something unmaintanable? In many cases, it is - there simply is no way around it. E.g. you can't expect to make a graphics application by maintaining your framebuffer as a python list of lists, and then have it update more than one frame / second.
ABPS
Allefant2
Allefant3
Allefant4
Allefant5
Allefant7
Battery
BlitzHack
BloboTron
Bob'n'Rob
Command Code
Donkey
Doomed
Dragonfly
Dungeon Simulator
EggHack
Evil
Feud
Flowers
Forest
Forest Explorer
FruitWorm
Garbage
GnomeGuard
Hare
Hedgehog
Hydra
Insanity
JetFighters
Kaos
Kings
Krampus18
Lawn
Lunte
Magnetotron
MarsFight
Nefertem
The Magical Flower
Owl
Photon
PI
PumpkinForest
Quest
Red, White & You
Santa Express
Shopkeeper
SIC
Snow Hill
SoF
Squiddle
Submarine
Swarm
Teacher
Tom
Troll
20000
Ultimatum
Velocity
Wave Rider
Wesnoth GFX Test
Witch
X
xmas
Yellow and Dangerous
Zombie Master
Zoo
Galaxy
HexMap
IsometricProjection
Land
VSync
Woosls
rm -rf wordpress
Allegro 5 regression testing
the end of END_OF_MAIN
Mini LDs
Shedskin
Retrohack