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 21147558.0 Ops/sec
Recursive 13663.9 Ops/sec
Memoization 1579062.0 Ops/sec
Recursive using Map as cache 4641197.0 Ops/sec
HTML Preparation code:
Tests:
  • Loop

  • Recursive

  • Memoization

  • Recursive using Map as cache