{"action":"opened","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/5280","labels_url":"https://api.github.com/repos/scipy/scipy/issues/5280/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/5280/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/5280/events","html_url":"https://github.com/scipy/scipy/issues/5280","id":107878929,"number":5280,"title":"1d scipy.signal.convolve much slower than numpy.convolve","user":{"login":"juliantaylor","id":542663,"avatar_url":"https://avatars.githubusercontent.com/u/542663?v=3","gravatar_id":"","url":"https://api.github.com/users/juliantaylor","html_url":"https://github.com/juliantaylor","followers_url":"https://api.github.com/users/juliantaylor/followers","following_url":"https://api.github.com/users/juliantaylor/following{/other_user}","gists_url":"https://api.github.com/users/juliantaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/juliantaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliantaylor/subscriptions","organizations_url":"https://api.github.com/users/juliantaylor/orgs","repos_url":"https://api.github.com/users/juliantaylor/repos","events_url":"https://api.github.com/users/juliantaylor/events{/privacy}","received_events_url":"https://api.github.com/users/juliantaylor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-23T09:19:44Z","updated_at":"2015-09-23T09:19:44Z","closed_at":null,"body":"`scipy.signal.convolve` is freakishly slow for simple 1d cases, np.convolve outclasses it by huge factors and produces the same results:\r\n\r\n```\r\nd = np.random.normal(size=232523)\r\nk = np.random.normal(size=5)\r\n\r\n%timeit np.convolve(d, k)\r\n%timeit scipy.signal.convolve(d, k)\r\n\r\nprint (np.convolve(d, k) == scipy.signal.convolve(d, k)).all()\r\nprint (np.convolve(d, k, mode=\"same\") == scipy.signal.convolve(d, k, mode=\"same\")).all()\r\nprint (np.convolve(d, k, mode=\"full\") == scipy.signal.convolve(d, k, mode=\"full\")).all()\r\n```\r\n\r\n```\r\n1000 loops, best of 3: 519 µs per loop\r\n10 loops, best of 3: 26.2 ms per loop\r\nTrue\r\nTrue\r\nTrue\r\n```\r\n\r\nas numpy is generally likely to be more optimized than scipy, scipy should probably just dispatch the 1d convolve to numpy.\r\nAlso scipy does not seem to release the GIL for the convolution."}}