{"action":"created","issue":{"url":"https://api.github.com/repos/dealii/dealii/issues/304","repository_url":"https://api.github.com/repos/dealii/dealii","labels_url":"https://api.github.com/repos/dealii/dealii/issues/304/labels{/name}","comments_url":"https://api.github.com/repos/dealii/dealii/issues/304/comments","events_url":"https://api.github.com/repos/dealii/dealii/issues/304/events","html_url":"https://github.com/dealii/dealii/issues/304","id":52007452,"node_id":"MDU6SXNzdWU1MjAwNzQ1Mg==","number":304,"title":"Use lower_bound more intelligently","user":{"login":"luca-heltai","id":2919756,"node_id":"MDQ6VXNlcjI5MTk3NTY=","avatar_url":"https://avatars1.githubusercontent.com/u/2919756?v=4","gravatar_id":"","url":"https://api.github.com/users/luca-heltai","html_url":"https://github.com/luca-heltai","followers_url":"https://api.github.com/users/luca-heltai/followers","following_url":"https://api.github.com/users/luca-heltai/following{/other_user}","gists_url":"https://api.github.com/users/luca-heltai/gists{/gist_id}","starred_url":"https://api.github.com/users/luca-heltai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luca-heltai/subscriptions","organizations_url":"https://api.github.com/users/luca-heltai/orgs","repos_url":"https://api.github.com/users/luca-heltai/repos","events_url":"https://api.github.com/users/luca-heltai/events{/privacy}","received_events_url":"https://api.github.com/users/luca-heltai/received_events","type":"User","site_admin":false},"labels":[{"id":114738734,"node_id":"MDU6TGFiZWwxMTQ3Mzg3MzQ=","url":"https://api.github.com/repos/dealii/dealii/labels/Enhancement","name":"Enhancement","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":{"login":"bangerth","id":7504421,"node_id":"MDQ6VXNlcjc1MDQ0MjE=","avatar_url":"https://avatars2.githubusercontent.com/u/7504421?v=4","gravatar_id":"","url":"https://api.github.com/users/bangerth","html_url":"https://github.com/bangerth","followers_url":"https://api.github.com/users/bangerth/followers","following_url":"https://api.github.com/users/bangerth/following{/other_user}","gists_url":"https://api.github.com/users/bangerth/gists{/gist_id}","starred_url":"https://api.github.com/users/bangerth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bangerth/subscriptions","organizations_url":"https://api.github.com/users/bangerth/orgs","repos_url":"https://api.github.com/users/bangerth/repos","events_url":"https://api.github.com/users/bangerth/events{/privacy}","received_events_url":"https://api.github.com/users/bangerth/received_events","type":"User","site_admin":false},"assignees":[{"login":"bangerth","id":7504421,"node_id":"MDQ6VXNlcjc1MDQ0MjE=","avatar_url":"https://avatars2.githubusercontent.com/u/7504421?v=4","gravatar_id":"","url":"https://api.github.com/users/bangerth","html_url":"https://github.com/bangerth","followers_url":"https://api.github.com/users/bangerth/followers","following_url":"https://api.github.com/users/bangerth/following{/other_user}","gists_url":"https://api.github.com/users/bangerth/gists{/gist_id}","starred_url":"https://api.github.com/users/bangerth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bangerth/subscriptions","organizations_url":"https://api.github.com/users/bangerth/orgs","repos_url":"https://api.github.com/users/bangerth/repos","events_url":"https://api.github.com/users/bangerth/events{/privacy}","received_events_url":"https://api.github.com/users/bangerth/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2014-12-15T16:32:15Z","updated_at":"2018-10-16T04:00:56Z","closed_at":"2018-10-16T04:00:56Z","author_association":"MEMBER","body":"_From [bange...@gmail.com](https://code.google.com/u/111126369971033778052/) on April 02, 2013 22:31:42_\n\nThere are a bunch of places in the library where we use std::lower_bound or Utilities::lower_bound to find the place to insert or lookup an element into a sorted array. Importantly, some of these places actually look up or insert _several_ elements and in this case we can optimize things a bit. For example, if we have that\n\n```\np = lower_bound (x.begin(), x.end(), values[i]);\n```\n\nthen we could compute the place to insert values[i+1] using the same statement, or we could improve things by doing something like\n\n```\nif (values[i+1] > values[i])\n\n    p = lower_bound (p, x.end(), values[i+1]);\n\nelse\n\n    p = lower_bound (x.begin(), p, values[i+1]);\n```\n\nThis should on average save one bisection step which may be relevant if the arrays we store into/lookup in are relatively small.\n\n_Original issue: http://code.google.com/p/dealii/issues/detail?id=25_\n"},"comment":{"url":"https://api.github.com/repos/dealii/dealii/issues/comments/430092988","html_url":"https://github.com/dealii/dealii/issues/304#issuecomment-430092988","issue_url":"https://api.github.com/repos/dealii/dealii/issues/304","id":430092988,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDA5Mjk4OA==","user":{"login":"bangerth","id":7504421,"node_id":"MDQ6VXNlcjc1MDQ0MjE=","avatar_url":"https://avatars2.githubusercontent.com/u/7504421?v=4","gravatar_id":"","url":"https://api.github.com/users/bangerth","html_url":"https://github.com/bangerth","followers_url":"https://api.github.com/users/bangerth/followers","following_url":"https://api.github.com/users/bangerth/following{/other_user}","gists_url":"https://api.github.com/users/bangerth/gists{/gist_id}","starred_url":"https://api.github.com/users/bangerth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bangerth/subscriptions","organizations_url":"https://api.github.com/users/bangerth/orgs","repos_url":"https://api.github.com/users/bangerth/repos","events_url":"https://api.github.com/users/bangerth/events{/privacy}","received_events_url":"https://api.github.com/users/bangerth/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T04:00:56Z","updated_at":"2018-10-16T04:00:56Z","author_association":"MEMBER","body":"No. Let's do it."}}
{"actor":{"display_login":"bangerth"}}