May 24th 2005
Speed Demon again
So, back in an earlier alpha of 2005, I sped up Graphics.DrawPicture immensely. So much so that it basically made it so that UseOldRenderer didn’t make a difference, which is great, and the way it should have been. I thought that was fast.
But, someone on the betas list started complaining about speed — of something I had already sped up, and when sharking the performance, found out that 70% was just drawing pictures. So, last night, I set out to solve that problem with another optimization in mind.
My results were staggering. I was truly taken aback. Here’s the results:
(All tests draw the same image 4000 times — this particular optimization won’t affect images that were being altered each time before being drawn, only repetitive drawing of the same image)
In 2005 after changes:
100×100x32 image: 18 ticks
2000×2000x32 image: 24 ticks
100×100x32 with mask image: 19 ticks
2000×2000x32 with mask image: 25 ticks
Before changes in 2005:
100×100x32 images: 79 ticks
2000×2000x32 images: 20927 ticks
100×100x32 with mask images: 81 ticks
2000×2000x32 with mask images: 20696 ticks
Ahh… much better. No, these aren’t typos: the same test that took 5.78 minutes before now takes less than half a second. Let me know what you think if you’re on the betas list when the new beta comes out.