DEV Community

Discussion on: Solving Puzzles With High-Performance JavaScript

Collapse
 
healeycodes profile image
Andrew Healey

Interesting proposal. I ran it ten times on LeetCode and didn't get a faster answer (not that that means anything!).

I ran both functions one million times on a 445-char lorem ipsum text in Chrome latest. It seems that caching the variable is marginally faster 😊