logoalt Hacker News

KolmogorovComptoday at 11:40 AM2 repliesview on HN

> making it very easy to go from O(n) to O(2n)

Strictly speaking I assume everyone knows O(n) = O(2n) =O(kn) for k in R.

But I see your point. I assume any decent compiler would merge the loops though


Replies

cupofjoakimtoday at 12:50 PM

Fair! That'd depend on the operations right? For example, AFAIK typescript can't do much about multiple chained `map` calls, and i've seen quite a few `.filter(...).map(...).filter(Boolean).map(...)` :/

show 1 reply
frwrfwrfeefwftoday at 2:04 PM

what if k = n

show 1 reply