495 views

1 Answer

Best answer
5 votes
5 votes
It is a general rule of thumb that statically done operations are much faster than the dynamically done operations. In static operations, the operations are known before compiling, so the compiler can take steps to optimize them, and the general cost of allocating memory during runtime, which is done during the dynamic operations,  is skipped.

However, there are some disadvantages to this also,  if you want everything to be statically done then you should know the exact requirements of your code before hand, also all the operations should be deterministic. Whereas, the dynamic system gives you the flexibility of deciding things on the fly. Majority of the systems do things dynamically except for some Real time OS where the performance is of critical importance.
edited by

Related questions

1 votes
1 votes
0 answers
1
iarnav asked Aug 25, 2018
281 views
Please explain Dynamic linking and Dynamic Libraries in an intuitive way with an example.
0 votes
0 votes
1 answer
3
Na462 asked Jul 1, 2018
250 views
Compare Following Points between Static and Dynamic Linking :- 1. Program Startup.2. Overall Page Fault Rate.
7 votes
7 votes
4 answers
4