3 ms·
They are, but calling a function asynchronously takes a lot longer than synchronously. For small functions the execution time could easily be increased by more
by tormeh 8y ago
They are, but calling a function asynchronously takes a lot longer than synchronously. For small functions the execution time could easily be increased by more than 100%. It's something that only really makes sense if the function will do (slow) I/O or a lot of computation, and the program has other things it could do in the meantime.
Making every function call asynchronous is likely to make most programs a lot slower.