Thread with 8 posts
jump to expanded postfor no particularly good reason, i am currently reading about Apple's QuickDraw, the graphics library used by the original Macintosh from 1984. i'm amazed to learn that it uses compression not just to save memory, but to save CPU cycles for processing https://en.wikipedia.org/wiki/QuickDraw
looping over every pixel one-by-one is expensive. for relatively simple images used in the GUI (for example, two outlined intersecting rectangles), it is cheaper to compress the images to something akin to run-length encoding, do the operations in compressed form, then uncompress
there's all sorts of interesting implications to this idea. for example, processing time (excepting the compression/decompression stage) would scale not with image size, but with the amount of detail in the image. you also would presumably try to directly emit compressed images
i happen to be aware that, historically speaking, the routines in “accelerated” 2D graphics drivers for Windows were also very complex. i don't know what they were doing, but perhaps they did similar tricks. today, of course, 2D graphics routines of this kind are obsolete
with the coming of the 21st century, the “embarrassingly parallel” power of the GPU, a processor designed exclusively for 3D applications, became too big to ignore, and it completely obsoleted this type of optimised CPU routines or hardware for handling 2D graphics for GUIs
GPUs are funny because, if “operations executed” is your metric of efficiency, they're very inefficient compared to what QuickDraw and the like were doing. and in fact they are “bad” at 2D generally! but they have such absurd throughput that it doesn't matter. the GPU is king now
a funny thing about the GPU being king now is that all modern operating systems need a GPU to render their GUI. there's a software (CPU) simulation of a GPU that kicks in on Windows if you don't have a hardware one available. and it is less efficient than the old routines :)
why am i doing computer autism all of a sudden. please excuse me, i'm going to return to music autism. pray for me that i do not become the floppy disk girl