{"action":"created","issue":{"url":"https://api.github.com/repos/opencog/opencog/issues/1434","labels_url":"https://api.github.com/repos/opencog/opencog/issues/1434/labels{/name}","comments_url":"https://api.github.com/repos/opencog/opencog/issues/1434/comments","events_url":"https://api.github.com/repos/opencog/opencog/issues/1434/events","html_url":"https://github.com/opencog/opencog/issues/1434","id":62805773,"number":1434,"title":"Atomspace Benchmark for getHandleSet is borken","user":{"login":"inflector","id":1048706,"avatar_url":"https://avatars.githubusercontent.com/u/1048706?v=3","gravatar_id":"","url":"https://api.github.com/users/inflector","html_url":"https://github.com/inflector","followers_url":"https://api.github.com/users/inflector/followers","following_url":"https://api.github.com/users/inflector/following{/other_user}","gists_url":"https://api.github.com/users/inflector/gists{/gist_id}","starred_url":"https://api.github.com/users/inflector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inflector/subscriptions","organizations_url":"https://api.github.com/users/inflector/orgs","repos_url":"https://api.github.com/users/inflector/repos","events_url":"https://api.github.com/users/inflector/events{/privacy}","received_events_url":"https://api.github.com/users/inflector/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-18T21:27:56Z","updated_at":"2015-03-19T12:42:11Z","closed_at":null,"body":"The recent Atomspace changes have made the benchmark show much worse performance. I was getting times about 110 seconds and 900 ops per second after changing shared_mutex to mutex for:\r\n```\r\n./atomspace_bm -m  getHandleSet\r\n```\r\nI was getting times below 90 seconds and ops per second above 1,050 consistently after all my proposed changes. Now I get:\r\n```\r\nBenchmarking AtomSpace's getHandleSet method 100000 times ..........\r\n283.211019 seconds elapsed (353.09 per second)\r\nSum clock() time for all requests: 248357539 (248.358 seconds, 402.645 requests per second)\r\n```\r\nCompare **248 seconds** to 110 seconds and **402 ops per second** to 900. Something unexpected must be happening."},"comment":{"url":"https://api.github.com/repos/opencog/opencog/issues/comments/83539571","html_url":"https://github.com/opencog/opencog/issues/1434#issuecomment-83539571","issue_url":"https://api.github.com/repos/opencog/opencog/issues/1434","id":83539571,"user":{"login":"inflector","id":1048706,"avatar_url":"https://avatars.githubusercontent.com/u/1048706?v=3","gravatar_id":"","url":"https://api.github.com/users/inflector","html_url":"https://github.com/inflector","followers_url":"https://api.github.com/users/inflector/followers","following_url":"https://api.github.com/users/inflector/following{/other_user}","gists_url":"https://api.github.com/users/inflector/gists{/gist_id}","starred_url":"https://api.github.com/users/inflector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inflector/subscriptions","organizations_url":"https://api.github.com/users/inflector/orgs","repos_url":"https://api.github.com/users/inflector/repos","events_url":"https://api.github.com/users/inflector/events{/privacy}","received_events_url":"https://api.github.com/users/inflector/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T12:42:11Z","updated_at":"2015-03-19T12:42:11Z","body":"Ah okay, well unfortunately it is measuring the bottleneck for Python performance pretty well. I'd be happy to fix the benchmark with your suggestions and explore some of the relatively minor changes which will likely improve performance very well. The other benchmarks are doing better because you've likely saved lots of unnecessary resolves which were coming before because of the UUID store.\r\n\r\ngetHandleSet is measuring only the raw retrieval speed. When, as in the Python case, the only result you care about is the UUID since that is all you can use in Python at the moment, then the extra work involved in storing and retrieving AtomPtrs doesn't buy you anything. It costs you.\r\n\r\nI'm pleased the other cases are so much faster, it should be possible to make this one faster too, and probably return it to the same speeds as before."}}