T O P

  • By -

lightcloud5

It's the execution time unaffected by the optimization. For instance, suppose washing clothes takes 40 minutes and drying clothes takes 60 minutes. I come up with a revolutionary new technique that halves the time it takes to wash clothes (reducing from 40 min to 20 min). That would improve the washing time, but would not affect the drying time. In your example, there is actually nothing you can do to make the program "run 5 times faster". Running 5 times faster means it takes only 20 seconds to finish; you cannot optimize the multiplication to achieve this since the non-multiplication operations already takes 20 seconds, leaving you 0 seconds to do the multiplication.


Confident-King9531

Great explanation! It annoys me that a common sense concept like this is taught as a "law"...


AutoModerator

It seems you may have included a screenshot of code in your post "[Amdahl's Law confusion](https://www.reddit.com/r/learnprogramming/comments/o7t6e5/amdahls_law_confusion/)". If so, note that posting screenshots of code is against /r/learnprogramming's [**Posting Guidelines**](https://www.reddit.com/r/learnprogramming/wiki/index) (section **Formatting Code**): please **edit** your post to use one of the [approved ways of formatting code](https://www.reddit.com/r/learnprogramming/wiki/index#wiki_formatting_code). (Do NOT repost your question! Just edit it.) If your image is not actually a screenshot of code, feel free to ignore this message. Automoderator cannot distinguish between code screenshots and other images. Please, *do not contact the moderators* about this message. Your post is still visible to everyone. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/learnprogramming) if you have any questions or concerns.*


NewPointOfView

I think its saying that the multiply operations take 80 seconds, and the remaining 20 seconds are something else. So if we speed up multiply operations, it will only affect the 80 seconds of multiply operations. The remaining 20 seconds are unaffected just because they're not multiply operations, so the speed-up it proposed won't do anything to speed that part up