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

Test another remove_child method #37

Closed
douweschulte opened this issue Jan 12, 2021 · 1 comment
Closed

Test another remove_child method #37

douweschulte opened this issue Jan 12, 2021 · 1 comment

Comments

@douweschulte
Copy link
Owner

There is a method that does exactly what the implementation in remove_child_by does, so it could be that this is faster, in which case it should be used. If it is equal use this method as well, because it is cleaner.

@douweschulte
Copy link
Owner Author

I tested the currrent method against the vector.retain build in method and the later one proved ~+75% faster both on small and big test subjects. So the build in method will be used.

Benchmark: Remove - small average time over 53158 runs:
        53μs 991ns ± 11μs 631ns

Benchmark: Retain - small average time over 98754 runs:
        30μs 944ns ± 7μs 455ns

Benchmark: Remove - big average time over 374 runs:
        7ms 252μs ± 615μs 642ns

Benchmark: Retain - big average time over 716 runs:
        4ms 180μs ± 270μs 128ns

Remove: the build in method
Retain: using the vector.retain function
Small: 1ubq.pdb
Big: pTLS-6484.pdb

douweschulte added a commit that referenced this issue Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant