513ef1dfe1
Code map((x) => ...).toList() is less efficient compared to an explicit loop. Replacing these code patterns with loops slightly improves bytecode generation speed (dart2js 1271 -> 1188 ms). Also, map with closure consumes more stack space which results in flaky stack overflow errors in kernel service on a test with deeply nested constants. Change-Id: If209fc28d521abcbad46b5b2c7cffefcf8cd0ecb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113217 Reviewed-by: Ryan Macnak <rmacnak@google.com> Reviewed-by: Régis Crelier <regis@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>