All examples By author By category About

chabb

Fibonacci, memoized and not memoized

This visualisation is made of two web workers. Both calculates each term of the fibonnaci sequence. One worker memoize its result, thus has a constant complexity. Other worker does not memoize its result, and go quadratic. You can notice the difference by watching the graphic, X-axis is the nth term of the sequence, Y-axis the time in milliseconds that the calculation took