News for hackers. Stuff that matters.
Re:Shopify invests in research for Ruby at scale by Lio on Wednesday May 18, 2022 @10:13AM (#31423040)
Ruby has had lazy iteration[1] for quite a while but as n here is only 10 there's really not much to loose in not using it.

In fact given that only a subset of users will be admin users for the second loop n is going to < 10 anyway.

I believe it was Rob Pike that actually said something along the lines of not bothering to optimise until you know that n is large[2].

1. https://ruby-doc.org/core-2.5.0/Enumerator/Lazy.html

2. https://users.ece.utexas.edu/~adnan/pike.html

There are no comments on this comment yet.