Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:71.0) Gecko/20100101 Firefox/71.0
Firefox 71
Mac OS X 10.15
Desktop
5 years ago
Test name Executions per second
Loop 17640006.0 Ops/sec
Recursive 13876.5 Ops/sec
Memoization 1578506.0 Ops/sec
Recursive using Map as cache 4573487.5 Ops/sec
HTML Preparation code:
Tests:
  • Loop

  • Recursive

  • Memoization

  • Recursive using Map as cache