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 sortedcontainers rather than blist for SortedDict implementation #25

Open
grantjenks opened this issue Sep 15, 2015 · 1 comment
Open

Comments

@grantjenks
Copy link

Hi, I noticed you're using the sorteddict implementation from the blist module in a few places:

  1. https://github.com/fiquant/marketsimulator/blob/master/marketsim/gen/_intrinsic/observable/minmax.py
  2. https://github.com/fiquant/marketsimulator/blob/master/marketsim/gen/_intrinsic/strategy/arbitrage.py
  3. https://github.com/fiquant/marketsimulator/blob/master/marketsim/gen/_intrinsic/event.py

I can't tell whether those places are performance-critical but if they are, consider using the sortedcontainers module in place of blist. SortedContainers is a pure-Python implementation of SortedList, SortedDict, and SortedSet types. The SortedDict implementation is actually faster than the one in blist and the API is the same.

If you're interested, I'm happy to submit a pull request. Let me know.

@antonkolotaev
Copy link
Member

Hi! Thanks a lot for your remarks.. Unfortunately I have stopped to work on
the project but you may add an issue or provide a patch so if there is a
person interested in the project he could take it into account.

With best regards,
Anton Kolotaev
15.09.2015 19:29 пользователь "Grant Jenks" [email protected]
написал:

Hi, I noticed you're using the sorteddict implementation from the blist
module in a few places:

https://github.com/fiquant/marketsimulator/blob/master/marketsim/gen/_intrinsic/observable/minmax.py
2.
https://github.com/fiquant/marketsimulator/blob/master/marketsim/gen/_intrinsic/strategy/arbitrage.py
3.
https://github.com/fiquant/marketsimulator/blob/master/marketsim/gen/_intrinsic/event.py

I can't tell whether those places are performance-critical but if they
are, consider using the sortedcontainers module in place of blist.
SortedContainers is a pure-Python implementation of SortedList, SortedDict,
and SortedSet types. The SortedDict implementation is actually faster than
the one in blist and the API is the same.

If you're interested, I'm happy to submit a pull request. Let me know.


Reply to this email directly or view it on GitHub
#25.

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