4 ms·
Hey what's amdahl's law. Can you explain
by ashishgautam0 3y ago
Hey what's amdahl's law. Can you explain
- trostaft 3y agoThe Wikipedia article is pretty good, but tldr: "the overall performance improvement gained by optimizing a single part of a system is limited by the fraction of time that the improved part is actually used." https://en.wikipedia.org/wiki/Amdahl%27s_law https://en.wikipedia.org/wiki/Amdahl%27s_law Usually used in the parallel computing context, but works here too.
- bombcar 3y agoSo if you have something that takes 1 second out of 10 seconds, you can't improve the overall system more than 1 second (by removing it entirely).
- astrange 3y agoThat's not true, because in addition to taking 1 second it could be emptying all your caches. Performance isn't just adding up wallclock times.
- robocat 3y agoSame thing happens when driving - your trip duration usually depends on the slow bits not the faster parts e.g. in NZ driving through small towns will often be the longest part of your trip time.
- _3u10 3y agoSomething about 5% of things can’t be parallelized which then ends up dominating performance after the 95% of things that can be parallelized are.
- mumumu 3y agoIn hardware engineering this is called critical path.
- memefrog 3y agoThat is about latency, but Amdahl's law is about throughput I think.
- CyberDildonics 3y agoAmdahl's law is not about latency or throughput, it is about optimizing one part of a program having diminishing returns relative to the part that isn't optimized. It is not really a law, it is more common sense that most people would never assume needs to be explicitly said.
- mumumu 3y agoAmdahl's law is common sense, but also the one of the reasons premature optimization is the root of all evil. A small speedup on the longest (by time) part of the program is usually better than infinite speedup on a short part of the program.