Minor performance optimization for lookups of `ArrayCollection#contains()` #241

Merged
merged 1 commit into from Jan 8, 2013

3 participants

@Ocramius
Doctrine member

No description provided.

@doctrinebot

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DCOM-159

@Ocramius
Doctrine member

Weird that this was patched for the opposite direction before O_o The previous commit reverting in_array was probably only considering empty collections. With larger collections, performance degrades a lot with foreach (even for just 100 elements)

@guilhermeblanco guilhermeblanco merged commit bc6bc47 into doctrine:master Jan 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment