TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

An advent of code solution which takes seconds on Safari and minutes on Chrome

8 pointsby bikeshavingover 4 years ago

1 comment

mjsir911over 4 years ago
A friend ran into this for her solution in javascript, and the drastic speed up was replacing the javascript object with a `Map` object.<p><pre><code> const seen = new Map() </code></pre> with `seen.set` and `seen.get` replacing `[]` runs the code in 5s on node on my machine