{"action":"created","issue":{"url":"https://api.github.com/repos/rdkit/rdkit/issues/2187","repository_url":"https://api.github.com/repos/rdkit/rdkit","labels_url":"https://api.github.com/repos/rdkit/rdkit/issues/2187/labels{/name}","comments_url":"https://api.github.com/repos/rdkit/rdkit/issues/2187/comments","events_url":"https://api.github.com/repos/rdkit/rdkit/issues/2187/events","html_url":"https://github.com/rdkit/rdkit/issues/2187","id":388638391,"node_id":"MDU6SXNzdWUzODg2MzgzOTE=","number":2187,"title":"how to speed up python (rdkit) scripts","user":{"login":"rmrmg","id":20069573,"node_id":"MDQ6VXNlcjIwMDY5NTcz","avatar_url":"https://avatars1.githubusercontent.com/u/20069573?v=4","gravatar_id":"","url":"https://api.github.com/users/rmrmg","html_url":"https://github.com/rmrmg","followers_url":"https://api.github.com/users/rmrmg/followers","following_url":"https://api.github.com/users/rmrmg/following{/other_user}","gists_url":"https://api.github.com/users/rmrmg/gists{/gist_id}","starred_url":"https://api.github.com/users/rmrmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmrmg/subscriptions","organizations_url":"https://api.github.com/users/rmrmg/orgs","repos_url":"https://api.github.com/users/rmrmg/repos","events_url":"https://api.github.com/users/rmrmg/events{/privacy}","received_events_url":"https://api.github.com/users/rmrmg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-07T12:38:46Z","updated_at":"2018-12-07T13:44:09Z","closed_at":null,"author_association":"NONE","body":"Standard Python implementation (CPython) is not extremely fast and I'm looking for something which allow to speed up my scripts. I guess my scripts are quite usual: many RDkit operations on mols like GetAtom(), GetBond(), GetSubstruct() and so on  and 'standard' python operation (no heavy numeric calculation, no big matrices and so on). The following option I found on internet:\r\n-) pypy in general the best (the easier) way to speed up python execution but it doesn't work with rdkit. AFAIK the most reasonable workaround if to wrap needed RDkit function in separate python module \r\n-) numba which allow just-in-time compilation of specified function(s) look nice but it doesn't work with try,catch block \r\n-)Cython which allow to compile whole script but AFAIK if one want to have any speed up some modification is needed (static typing)\r\nDo you have any other solution? Do you have any hand-on experience with any of above? Any suggestions or tips?"},"comment":{"url":"https://api.github.com/repos/rdkit/rdkit/issues/comments/445236649","html_url":"https://github.com/rdkit/rdkit/issues/2187#issuecomment-445236649","issue_url":"https://api.github.com/repos/rdkit/rdkit/issues/2187","id":445236649,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTIzNjY0OQ==","user":{"login":"bp-kelley","id":9888416,"node_id":"MDQ6VXNlcjk4ODg0MTY=","avatar_url":"https://avatars1.githubusercontent.com/u/9888416?v=4","gravatar_id":"","url":"https://api.github.com/users/bp-kelley","html_url":"https://github.com/bp-kelley","followers_url":"https://api.github.com/users/bp-kelley/followers","following_url":"https://api.github.com/users/bp-kelley/following{/other_user}","gists_url":"https://api.github.com/users/bp-kelley/gists{/gist_id}","starred_url":"https://api.github.com/users/bp-kelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bp-kelley/subscriptions","organizations_url":"https://api.github.com/users/bp-kelley/orgs","repos_url":"https://api.github.com/users/bp-kelley/repos","events_url":"https://api.github.com/users/bp-kelley/events{/privacy}","received_events_url":"https://api.github.com/users/bp-kelley/received_events","type":"User","site_admin":false},"created_at":"2018-12-07T13:44:09Z","updated_at":"2018-12-07T13:44:09Z","author_association":"CONTRIBUTOR","body":"Without knowing what you are trying to optimize, this is a challenging problem.\r\n\r\nDo you have an example?\r\n\r\nIn python one generally wants to minimize function calls if possible.  I.e. using iterations like GetAtoms versus GetAtomWithIdx.\r\n\r\nHowever,  I’ve found that using multiprocessing is by far the easiest way to speed up performance with minimal effort.\r\n\r\nDo you have an example of the type of things you want to optimize?"}}
{"actor":{"display_login":"bp-kelley"}}