Quiz

  1. Quick clarification question! So the original HTML that we hide up is just a basic template, and we make a copy of it to modify every time we use .clone?

    Yes, that's right. We can take our time editing it, tweaking it until it's just right, then hide it and clone it as needed.

  2. Does the time & space complexity of a sorting algorithm have any significant impact on performance, considering the processing power of computers today?

    What an interesting question! I have several thoughts, in no particular order.

    First, the very definition of performance is closely related to time & space. (Additional factors might be the algorithm's effect of cache hit rate or even paging behavior.)

    But maybe your focus is on the word significant. It's true that modern computers are blinding fast, and so you could use a terrible algorithm (like Bubble Sort) on a modest size array (say, 10,000 elements) and sort it in a short amount of time.

    However, why not use a better algorithm? Even if it only saves 1% of the computation time, that's 1% less greenhouse gasses emitted in order to power that computation. True, these things are negligible by themselves, just as recycling a single aluminum can isn't going to make much difference. But I think we should still do so. (My opinion.)

    Besides, we're not choosing the algorithm in most cases. We're using the built-in JS algorithm and hoping that they've chosen a good one. If the data is truly large and we know something about it, it might be worth the effort to write a custom algorithm.