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

Implementation thoughts #10

Closed
mahmoud opened this issue Sep 21, 2016 · 1 comment
Closed

Implementation thoughts #10

mahmoud opened this issue Sep 21, 2016 · 1 comment

Comments

@mahmoud
Copy link

mahmoud commented Sep 21, 2016

Hi there! Great project! I was reviewing the implementation (love the cython bindings), but it occurred to me: have you considered using a linked-list + dict approach for the internals of the MultiDict? I may be wrong, but as it stands now, it seems like the access time may be O(n). It's good because it seems to preserve order, which I appreciate (some servers are header-order sensitive and query param order-sensitive).

I understand O(n) is probably ok most of the time for some protocols (HTTP probably has <10 headers on most requests), but I figured I'd ask anyway. Keep up the great work!

@asvetlov
Copy link
Member

I've tries to use an approach like you are suggesting.
Seems I've got no speedup but implementation was much more complex.

If anybody will publish a patch with benchmark measurements I'd love to review it but right now I think that performance is just good enough to stop investing my own time into it.

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

2 participants