Skip to content

Improved performance of ps_agent_flexible for large number of percepts#1

Open
jwallnoefer wants to merge 1 commit intoqic-ibk:masterfrom
jwallnoefer:master
Open

Improved performance of ps_agent_flexible for large number of percepts#1
jwallnoefer wants to merge 1 commit intoqic-ibk:masterfrom
jwallnoefer:master

Conversation

@jwallnoefer
Copy link

Especially important when using python2.

Explanation: The dictionary keys() method returns a list in python2, while in python3 it returns a dict_keys object. Needlessly building a list slows down the code significantly even for a moderate amount of percepts. (My code took about 10x longer to run on the cluster where only python2 is available.)
There is also a tiny speed-up for python3.

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

Successfully merging this pull request may close these issues.

1 participant