Join Slack
Powered by
Absolutely avoid calling forEach on Ranges. The co...
# announcements
k
karelpeeters
07/03/2017, 6:20 AM
Absolutely avoid calling forEach on Ranges. The cost is extremely high at around 300%
https://sites.google.com/a/athaydes.com/renato-athaydes/posts/kotlinshiddencosts-benchmarks
Thread in Slack Conversation For each is inline though, right? If so, the foreach and the lambda aren't present in the generated bytecode, and there's no performance hit.
Open in Slack
Previous
Next