@mjstromberg
Former mechanical engineer, current software engineer, and future ninjaneer.
Nothing here yet.
Nothing here yet.
That's a great question, and I think it would make for an interesting article. Although in my experience, I've found real-world performance testing to be very inconsistent. I suspect they would both perform similarly, but the answer could also be in the ECMAScript specification. Some curious people on Stack Overflow tried their hands at performance testing: https://stackoverflow.com/questions/21467642/is-there-a-performance-difference-between-let-and-var-in-javascript In the past when performance tuning, I've always found the low-hanging fruit on the UI side. Minimizing unnecessary dependencies, reducing renders, or optimizing the number of network requests were always first on the list. Depending on the application, I'd think these problems are on another order of magnitude impactful than changing the declaration. Hard to say though without context.