News for hackers. Stuff that matters.
Re:When counting lines in Ruby randomly failed deployments by ilyazub on Friday September 08, 2023 @03:42AM (#37430700)
tl;dr: str.count($\) was 1.5x faster compared to str.lines.count and didn't allocate additional memory.
Re:When counting lines in Ruby randomly failed deployments by ilyazub on Thursday September 21, 2023 @10:47AM (#37598436)
Thanks to `@Freaky` from Reddit for the wonderful feedback which led him to significantly improving `String#count` which be potentially included to Ruby: https://www.reddit.com/r/ruby/comments/16d4ha6/comment/k1f5m...