A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/greenrobot/EventBus/issues/120 below:

Use contains() rather than looping · Issue #120 · greenrobot/EventBus · GitHub

This is in reference to the subscribe method where you "for (Subscription subscription : subscriptions)"
it would be better to just do subscriptions.contains(newSubscription) right?

Using the syntactic sugar for loop is a tiny performance hit in Android anyway...
http://developer.android.com/training/articles/perf-tips.html#Loops (last line of section), there was also a presentation I saw somewhere where they said the syntactic sugar for loop also uses more memory.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4