{"action":"created","issue":{"url":"https://api.github.com/repos/gonetz/GLideN64/issues/988","repository_url":"https://api.github.com/repos/gonetz/GLideN64","labels_url":"https://api.github.com/repos/gonetz/GLideN64/issues/988/labels{/name}","comments_url":"https://api.github.com/repos/gonetz/GLideN64/issues/988/comments","events_url":"https://api.github.com/repos/gonetz/GLideN64/issues/988/events","html_url":"https://github.com/gonetz/GLideN64/pull/988","id":154941381,"number":988,"title":"Framebuffer copy performance improvements","user":{"login":"fzurita","id":11581687,"avatar_url":"https://avatars.githubusercontent.com/u/11581687?v=3","gravatar_id":"","url":"https://api.github.com/users/fzurita","html_url":"https://github.com/fzurita","followers_url":"https://api.github.com/users/fzurita/followers","following_url":"https://api.github.com/users/fzurita/following{/other_user}","gists_url":"https://api.github.com/users/fzurita/gists{/gist_id}","starred_url":"https://api.github.com/users/fzurita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzurita/subscriptions","organizations_url":"https://api.github.com/users/fzurita/orgs","repos_url":"https://api.github.com/users/fzurita/repos","events_url":"https://api.github.com/users/fzurita/events{/privacy}","received_events_url":"https://api.github.com/users/fzurita/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-05-16T00:30:55Z","updated_at":"2016-05-17T10:44:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gonetz/GLideN64/pulls/988","html_url":"https://github.com/gonetz/GLideN64/pull/988","diff_url":"https://github.com/gonetz/GLideN64/pull/988.diff","patch_url":"https://github.com/gonetz/GLideN64/pull/988.patch"},"body":"I've been trying to investigate where the performance loss is when enabling frame buffer emulation and one big hitter that I found is the ```_writeToRdram``` method in FrameBuffer.cpp\r\n\r\nI noticed that in that method we are copying either 1 byte or 2 bytes at a time for the whole frame buffer. This does seem inefficient to me since most architectures now a day are 32 bits, so you can write 4 bytes in one operation.\r\n\r\nI refactored the code so that we would write 4 bytes at a time to memory. I did this be creating ```_writeToRdram8``` and ```_writeToRdram16``` functions.\r\n\r\nI want to make sure the changes are correct. What are some good games to verify this in?\r\n\r\nAlso, with CopyDepthBufferToRDRAM setting enabled, the Majoras's mask spinning N64 logo intro went from ~38fps to ~52fps in my device."},"comment":{"url":"https://api.github.com/repos/gonetz/GLideN64/issues/comments/219682448","html_url":"https://github.com/gonetz/GLideN64/pull/988#issuecomment-219682448","issue_url":"https://api.github.com/repos/gonetz/GLideN64/issues/988","id":219682448,"user":{"login":"fzurita","id":11581687,"avatar_url":"https://avatars.githubusercontent.com/u/11581687?v=3","gravatar_id":"","url":"https://api.github.com/users/fzurita","html_url":"https://github.com/fzurita","followers_url":"https://api.github.com/users/fzurita/followers","following_url":"https://api.github.com/users/fzurita/following{/other_user}","gists_url":"https://api.github.com/users/fzurita/gists{/gist_id}","starred_url":"https://api.github.com/users/fzurita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzurita/subscriptions","organizations_url":"https://api.github.com/users/fzurita/orgs","repos_url":"https://api.github.com/users/fzurita/repos","events_url":"https://api.github.com/users/fzurita/events{/privacy}","received_events_url":"https://api.github.com/users/fzurita/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T10:44:15Z","updated_at":"2016-05-17T10:44:15Z","body":"I submitted the pull request mainly to get the idea of there. I was open updating it duplicate code less. I'll try your patch tonight to see if I see if I get the same improvements."}}