September 8, 2026

Haskell for Hobos -- Coding for Speed

In a word: don't.

This is good advice in almost all situations with any language.

It is especially good advice when learning Haskell. Aim to write good clear code and don't fret over how you wouldn't do such things in an imperative language.

Older (i.e. "mature") programmers may have to fight this urge. We come from the times of FORTRAN and programs punched into card decks. We paid for runtime by the minute and faced long "turnaround time" after we handed over our card decks to be read into the machine.

It is more important to learn Haskell and to write clear code than to save a few milliseconds of run time. Old habits are hard to break. Any program that deals with lists no longer that 100 entries, or even 1000 entries can just use brute force, perform linear searches, and on todays machines will run in less than a second.

There are cases where speed matters, but they are few and far between.


Have any comments? Questions? Drop me a line!

Tom's software pages / tom@mmto.org