{"id":17,"date":"2023-05-14T21:56:50","date_gmt":"2023-05-14T21:56:50","guid":{"rendered":"https:\/\/blogs.scummvm.org\/eklipsed\/?p=17"},"modified":"2023-05-14T21:56:50","modified_gmt":"2023-05-14T21:56:50","slug":"initial-results","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/eklipsed\/2023\/05\/14\/initial-results\/","title":{"rendered":"Initial Results&#8230;"},"content":{"rendered":"\r\n<p>Before I start on any optimizations I first have to measure how fast or slow the code right now is.<\/p>\r\n<p><br \/>First, I took the code through callgrind and took a look at it in kcachegrind. What my mentors remembered were the bottlenecks was correct, the main bottlenecks in drawing were converting the pixels to ARGB, and blending the pixels themselves.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-21\" src=\"https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/05\/KCacheGrindScreenshot1-300x163.png\" alt=\"\" width=\"300\" height=\"163\" srcset=\"https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/05\/KCacheGrindScreenshot1-300x163.png 300w, https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/05\/KCacheGrindScreenshot1-1024x557.png 1024w, https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/05\/KCacheGrindScreenshot1-768x418.png 768w, https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/05\/KCacheGrindScreenshot1-1536x836.png 1536w, https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/05\/KCacheGrindScreenshot1-1200x653.png 1200w, https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/05\/KCacheGrindScreenshot1.png 1910w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\r\n<p><br \/>So now, lets measure the performance of this code. I wrote a pretty simple benchmark that measures the amount of time it takes for X number of BITMAP::blit calls to run. Here is the control group results:<br \/><br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-20\" src=\"https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/05\/BenchmarkResults1-300x61.png\" alt=\"\" width=\"300\" height=\"61\" srcset=\"https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/05\/BenchmarkResults1-300x61.png 300w, https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/05\/BenchmarkResults1.png 746w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><br \/><br \/>So yea, that&#8217;s where I&#8217;m starting with and I plan on making it faster.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Before I start on any optimizations I first have to measure how fast or slow the code right now is. First, I took the code through callgrind and took a look at it in kcachegrind. What my mentors remembered were the bottlenecks was correct, the main bottlenecks in drawing were converting the pixels to ARGB, [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":2,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":22,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/posts\/17\/revisions\/22"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}