4 ms·
CPU GUI rendering was reasonably fast for Win32 apps on Pentium III. Modern CPU many times faster and I expect GUI rendering to use negligible fraction of CPU r
by citrin_ru 6y ago
CPU GUI rendering was reasonably fast for Win32 apps on Pentium III. Modern CPU many times faster and I expect GUI rendering to use negligible fraction of CPU resources. Why this is not the case? Display resolution nowadays is higher, but the difference in pixel numbers is smaller than difference in CPU performance.
- kaba0 6y agoOlder graphics were much more simpler, like draw a line here and here, where you have to iterate through like 400px per line of a window border. Also, smaller resolution. CPUs are fast, and rendering could be multithreaded, but 4-16 very fast cores will still be slower than the very very wide SIMD of GPUs that can simultaneously operate on many many pixels. GPUs can also change to a different “lane” to compute while it waits on IO like some graphics. You also got gradients, transparency and the like, so you basically always have to do a full pass over every pixel, so on the order of 1000*1000 pixels. So GUI rendering definitely doesn’t use negligible CPU resources. It is the canonical example for a task that can be parallelized, so it only makes sense to do so.
- citrin_ru 6y ago> smaller resolution In early 2000s I've used a PC with 800x600px CRT monitor and one of early Intel Celerons. My memory is fuzzy, but at best it was cheapest Coppermine Celeron (more likely Mendocino). Nowadays I use notebook with Intel Core i5 2540M (quite old) and the biggest display I use has 2560x1440 pixels (much newer than notebook). Now I have at most (2560x1440)/(800x600) ~ 8 times more pixels. I didn't find numbers from the same benchmark for Coppermine and i5 2540M, but I expect 2540M to be at least 10 times faster than slowest Coppermine. So I think modern CPU are fast enough to render GUI at least as fast as 15-20 years ago. GPU of course can do this much faster, cannot argue with this. > You also got gradients, transparency and the like I wonder if users really want this or we have it for other reasons (like developers want to show-off and companies want to sell new OS/App). For me the peak GUI was around Windows 2000 - most of what come next was not really an improvement for me. I'm not representative (and mostly use i3 WM, not Windows), but the fact that Widnows XP was used well beyond official support ended and many users around the world still use Windows 7 tells that many users don't really want to follow the latest GUI trends, but instead they are forced to.
- kaba0 6y agoWell, drawing GUIs one pixel (okay with SIMD 4-8) at a time on a CPU core is still way too big of an overkill, especially that for display it usually gets through a GPU, so it gets written to memory and then copied over vs being generated into video memory itself. A CPU core is way too expensive for these “easy” calculation, like paint it black. And I’m not sure about the dates, but iGPUs have been around for quite some time now. Also, Windows 7 (I think the change happened at Vista) most definitely uses a compositor, so there is no CPU rendering at that level.