News for hackers. Stuff that matters.
Re:An Overwhelmingly Negative and Demoralizing Force by Aeolun on Wednesday April 09, 2025 @12:59AM (#43629009)
> an includes check on a large list in a dynamic language such as JS performs abysmally

Does it perform any better in statically compiled languages?

Re:An Overwhelmingly Negative and Demoralizing Force by ffsm8 on Wednesday April 09, 2025 @07:19AM (#43630924)
Depends on the implementation. E.g. Javas HashSets include has the same performance profile as a Map lookup. Its still not particularly performant with large datasets, but significantly less abysmal then a regular JS .includes().

I just didn't want to explore the example to such a depth, as it felt irrelevant to me at the time of writing.