From abc920be27480d623f5727c80a0f6e0175189842 Mon Sep 17 00:00:00 2001 From: Raymond Rutjes Date: Tue, 24 Apr 2018 22:48:48 +0200 Subject: [PATCH] Update performance.md --- performance.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/performance.md b/performance.md index bdd70df..ad03e9f 100644 --- a/performance.md +++ b/performance.md @@ -67,7 +67,7 @@ about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%." -- Knuth Add: https://www.youtube.com/watch?time_continue=429&v=RT46MpK39rQ - * don't ignore the the easy optimizations + * don't ignore the easy optimizations * more knowledge of algorithms and data structures makes more optimizations "easy" or "obvious" "Should you optimize? "Yes, but only if the problem is important, the program @@ -220,7 +220,7 @@ speeding up routine that takes 80% of the time by only 10% will improve runtime by almost 8%. Profiles will help identify where time is actually spent. When optimizing, you want to reduce the amount of work the CPU has to do. -Quicksort is faster than bubble sort because it solves then same problem +Quicksort is faster than bubble sort because it solves the same problem (sorting) in fewer steps. It's a more efficient algorithm. You've reduced the work the CPU needs to do in order to accomplish the same task.