3 ms·
I think they might be claiming to be O(number of files changed) rather than O(total number of files) for incremental compiles.
by nicoburns 6y ago
I think they might be claiming to be O(number of files changed) rather than O(total number of files) for incremental compiles.
- orf 6y agoProbably, but saying “each O(n) change takes O(1)” is a pretty confusing way of putting it.
- elpool2 6y agoSort of. What they're talking about is the time it takes to rebuild during your dev-cycle, when you will typically be editing 1 or 2 typescript files and then refreshing your browser. In this case N is the total number of files in the project. Other bundlers will be O(n) because they need to bundle all N files together (higher values of N result in longer build time). While Snowpack will still be O(1) because the time it takes to rebuild the 1 or 2 files you edited does not increase with the value of N.