-
Notifications
You must be signed in to change notification settings - Fork 36
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
Refactor EnumMap - fixes #91 #92
Conversation
436164f
to
6227f02
Compare
@prolic As you can see the changes will make it a but slower - If you have a another idea how to fix this and how to make
|
@marc-mabe Let me check this weekend. I am very busy these days. |
Yea - no problem - thanks |
Looks good to me. About the benchOffsetSet*-methods: I have no idea why this is taking so much memory. You could debug with |
8337a8a
to
cb53736
Compare
EnumMap
is serializable, tooSplObjectStorage
Serializable
ArrayAccess
,Countable
andIterator
SeekableIterator
public function attach($enumerator) : void
public function offsetSet($enumerator) : void
public function detach($enumerator): void
public function offsetUnset($enumerator) : void
public addAll(SplObjectStorage $storage) : void
public getHash(object $object) : string
public removeAll(SplObjectStorage $storage) : void
public removeAllExcept(SplObjectStorage $storage) : void
public serialize(void) : string
public setInfo(mixed $data) : void
public unserialize(string $serialized) : void
public contains($enumerator) : bool
public offsetExists($enumerator) : bool
but returns true onNULL
valuespublic function seek(int $pos) : void
public function getKeys() : Enum[]
public function getValues() : mixed[]
public function search($enumerator, bool $strict) : Enum|null
fixes #91