Skip to content

Laboratory · Algorithms Lab

Why does this list get slower as it grows?

Briefing

Why does a lookup written inside a render loop turn a linear list into a quadratic one, and when does that actually matter in a browser?

A table that is instant with fifty rows crawls with five thousand. Nothing about the code changed, only the value of n.

Laboratory
Algorithms Lab
Level
ENGINEER
Estimated time
9 minutes
Method
measurement
Variables under observation
complexityhash mapsrender costmeasurement