Comment

Comment by JoeBot3000

> You can make either function take arbitrarily long by increasing the size of the input. The second one scales worse.

I think this is the point, the second one scales worse - absolutely (ignoring the bug you mentioned) however it really is more readable, and because V8 is so fast, why not use the second version?

Block comments and function names are important, but if someone needs to modify the code to add or change functionality nothing beats simple & readable code.

parent JoeBot3000 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton