Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use contains() rather than looping #120

Closed
brh opened this issue Sep 26, 2014 · 0 comments
Closed

Use contains() rather than looping #120

brh opened this issue Sep 26, 2014 · 0 comments
Milestone

Comments

@brh
Copy link

brh commented Sep 26, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants