Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Unified Diff: runtime/lib/array.dart

Issue 509373003: Manually inline fixed-size list's forEach, to make it possible for the VM to optimize. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array.dart
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index a24e404db02a382ea323e9119bec2f350d28cdcc..e12344868e3061b4695906c00458629a8fb01cbd 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -117,7 +117,9 @@ class _List<E> implements List<E> {
}
void forEach(f(E element)) {
- IterableMixinWorkaround.forEach(this, f);
+ for (int i = 0; i < length; i++) {
kasperl 2014/08/28 13:45:18 Does it make a difference if you cache length in a
Anders Johnsen 2014/08/28 14:20:12 Done.
+ f(this[i]);
+ }
}
String join([String separator = ""]) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698