{"action":"created","issue":{"url":"https://api.github.com/repos/ef363/FFT/issues/3","labels_url":"https://api.github.com/repos/ef363/FFT/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/ef363/FFT/issues/3/comments","events_url":"https://api.github.com/repos/ef363/FFT/issues/3/events","html_url":"https://github.com/ef363/FFT/issues/3","id":67700814,"number":3,"title":"Performance","user":{"login":"danielf","id":12701,"avatar_url":"https://avatars.githubusercontent.com/u/12701?v=3","gravatar_id":"","url":"https://api.github.com/users/danielf","html_url":"https://github.com/danielf","followers_url":"https://api.github.com/users/danielf/followers","following_url":"https://api.github.com/users/danielf/following{/other_user}","gists_url":"https://api.github.com/users/danielf/gists{/gist_id}","starred_url":"https://api.github.com/users/danielf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielf/subscriptions","organizations_url":"https://api.github.com/users/danielf/orgs","repos_url":"https://api.github.com/users/danielf/repos","events_url":"https://api.github.com/users/danielf/events{/privacy}","received_events_url":"https://api.github.com/users/danielf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-10T23:09:18Z","updated_at":"2015-04-23T01:25:13Z","closed_at":null,"body":"Make sure you test not only accuracy but also speed. For instance, you don't need to recompute the twiddle in every iteration of FFT (which uses the math.exp function, that while it is O(1), it is pretty slow). You can compute the new value using the previous one by a simple multiplication.\r\n\r\nIt would be good to have a framework that times different parts of the software and outputs a report, so that you know where to spend time tuning for speed."},"comment":{"url":"https://api.github.com/repos/ef363/FFT/issues/comments/95382287","html_url":"https://github.com/ef363/FFT/issues/3#issuecomment-95382287","issue_url":"https://api.github.com/repos/ef363/FFT/issues/3","id":95382287,"user":{"login":"danielf","id":12701,"avatar_url":"https://avatars.githubusercontent.com/u/12701?v=3","gravatar_id":"","url":"https://api.github.com/users/danielf","html_url":"https://github.com/danielf","followers_url":"https://api.github.com/users/danielf/followers","following_url":"https://api.github.com/users/danielf/following{/other_user}","gists_url":"https://api.github.com/users/danielf/gists{/gist_id}","starred_url":"https://api.github.com/users/danielf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielf/subscriptions","organizations_url":"https://api.github.com/users/danielf/orgs","repos_url":"https://api.github.com/users/danielf/repos","events_url":"https://api.github.com/users/danielf/events{/privacy}","received_events_url":"https://api.github.com/users/danielf/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T01:25:13Z","updated_at":"2015-04-23T01:25:13Z","body":"You need a systematic way to profile your code. Create code to do the profiling!\r\n\r\nAlso, always think about what you are doing. In particular: Y += [Ynew] is more expensive than Y.append(Ynew), but both are unnecessarily expensive given that you know the final length of Y at the beginning of the DFT call."}}