News for hackers. Stuff that matters.
Re:Go + Services = One Goliath Project by erik_seaberg on Saturday December 21, 2019 @07:51PM (#21854370)
A for loop could mean anything, and not necessarily what the author intended. https://en.wikipedia.org/wiki/Rule_of_least_power leads to list.filter(p) always calls p O(n) and returns a list of the same type with some or all of the same elements. list.map(f) always calls f O(n) times and returns a list of the same length. p and f can be reused and only depend on a single element. A good platform will inline list.filter(p).head into machine code that exits a loop early, that you don't have to write or review.

There are no comments on this comment yet.