{"action":"created","issue":{"url":"https://api.github.com/repos/star-bnl/star-picoDst/issues/68","repository_url":"https://api.github.com/repos/star-bnl/star-picoDst","labels_url":"https://api.github.com/repos/star-bnl/star-picoDst/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/star-bnl/star-picoDst/issues/68/comments","events_url":"https://api.github.com/repos/star-bnl/star-picoDst/issues/68/events","html_url":"https://github.com/star-bnl/star-picoDst/issues/68","id":185145815,"number":68,"title":"Possible speed up of StPicoUtilities::calculateRefMult()","user":{"login":"plexoos","id":5005079,"avatar_url":"https://avatars.githubusercontent.com/u/5005079?v=3","gravatar_id":"","url":"https://api.github.com/users/plexoos","html_url":"https://github.com/plexoos","followers_url":"https://api.github.com/users/plexoos/followers","following_url":"https://api.github.com/users/plexoos/following{/other_user}","gists_url":"https://api.github.com/users/plexoos/gists{/gist_id}","starred_url":"https://api.github.com/users/plexoos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plexoos/subscriptions","organizations_url":"https://api.github.com/users/plexoos/orgs","repos_url":"https://api.github.com/users/plexoos/repos","events_url":"https://api.github.com/users/plexoos/events{/privacy}","received_events_url":"https://api.github.com/users/plexoos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-10-25T15:07:53Z","updated_at":"2016-10-25T19:00:22Z","closed_at":null,"body":"While looking at `picoDst` code I noticed that `StPicoUtilities::calculateRefMult()` creates and fills a map of track multiplicities indexed by strings. Using strings for map element look up in general is less efficient than using int's. Since the look up is done a few times per track I suspect it can significantly affect the performance. I suggest we switch to `int` keys or perhaps even better to a fixed size std::array since the size of the created array is known in advance.\r\n\r\n@xuji19891014 Can you have a look please? \r\n\r\nhttps://github.com/star-bnl/star-picoDst/blob/master/StPicoEvent/StPicoUtilities.h"},"comment":{"url":"https://api.github.com/repos/star-bnl/star-picoDst/issues/comments/256142201","html_url":"https://github.com/star-bnl/star-picoDst/issues/68#issuecomment-256142201","issue_url":"https://api.github.com/repos/star-bnl/star-picoDst/issues/68","id":256142201,"user":{"login":"MustafaMustafa","id":1043083,"avatar_url":"https://avatars.githubusercontent.com/u/1043083?v=3","gravatar_id":"","url":"https://api.github.com/users/MustafaMustafa","html_url":"https://github.com/MustafaMustafa","followers_url":"https://api.github.com/users/MustafaMustafa/followers","following_url":"https://api.github.com/users/MustafaMustafa/following{/other_user}","gists_url":"https://api.github.com/users/MustafaMustafa/gists{/gist_id}","starred_url":"https://api.github.com/users/MustafaMustafa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MustafaMustafa/subscriptions","organizations_url":"https://api.github.com/users/MustafaMustafa/orgs","repos_url":"https://api.github.com/users/MustafaMustafa/repos","events_url":"https://api.github.com/users/MustafaMustafa/events{/privacy}","received_events_url":"https://api.github.com/users/MustafaMustafa/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T19:00:22Z","updated_at":"2016-10-25T19:00:22Z","body":"That would be great, then we can also do a binary test of the performance.\n\n--Mustafa\n\nOn Tue, Oct 25, 2016 at 11:36 AM, Dmitri Smirnov <notifications@github.com>\nwrote:\n\n> I tried to search but could not find the version with arrays. There is one\n> with separate loops and routines for each multiplicity type but that one\n> was already replaced by the single loop with the map. Anyway, let me show\n> what I have in mind and then you tell me if it less maintainable and why :)\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/star-bnl/star-picoDst/issues/68#issuecomment-256131785>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AA_qi9lMXAIY29sT-P2V6UdAJeowYYhmks5q3kw_gaJpZM4KgGsl>\n> .\n>\n"}}
{"actor":{"display_login":"MustafaMustafa"}}