Thomas Lumley 1/12/2017

Mature and premature optimisation

Read Original

The article explores the concept of premature vs. mature optimization through a personal coding example. The author initially used a simple but inefficient method to grow a vector in R, which profiling revealed was consuming 90% of the runtime. The post argues this was the correct initial choice for clarity and correctness, and details the subsequent optimization using a pre-allocated buffer with an upper bound—a common technique in performance-critical software development.

Mature and premature optimisation

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes