Comment by EGreg

7 years ago

When I was a teenager I realized a good puzzle that’s a metaphor for this trade-off. Can someone solve it and generalize it?

1. Suppose you want to draw a line N pixels long. It costs X to draw a pixel, Y to copy and Z to paste. What is the cheapest (fastest) way to build the line as a function of N?

2. So I think in general, you may start slow, but them exponentially speed up, overtaking the spaghetti architecture guy.