4 ms·
You are correct. But the same strategy can be used for optimization. Eg. get rid of the whole if block, and preferably dependencies to make it pure so that it c
by z3t4 6y ago
You are correct. But the same strategy can be used for optimization. Eg. get rid of the whole if block, and preferably dependencies to make it pure so that it can be further optimized by caching the output. Although cpu can be faster then cache so always measure.