3 ms·
3. Does the solution require more thought and library expertise to get the same task done? Compilers were a huge boon over hand-built machine code and assembly
by ttfkam 4y ago
3. Does the solution require more thought and library expertise to get the same task done?
Compilers were a huge boon over hand-built machine code and assembly. In specific hot spots, someone can eke out better performance sometimes, but compilers emit pretty good performance all the time with much lower effort from the programmer. Early compilers were just okay. Modern compilers can regularly kick 99% of human skills to the curb with aggressive pipelining, speculation, and vector operations.
React is the assembly language in this analogy.
let count = 1;
is demonstrably better than
let [ count, setCount ] = useState(0);
Not having to keep useMemo() in mind all the time is demonstrably better when performance can be maintained without having to worry about it.
Less code = fewer bugs
Less code with equal or better performance is golden.