Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

It's 2016 and COMPILERS ARE STILL STUPID

Name: Cudder !cXCudderUE 2015-12-31 22:29

Just analysing a device driver for hardware few months old... as usual, it's as bloated as a week-old dead pig overall but then I come across pieces like this:

shl ecx, 4
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd
mov ecx, edx
and ecx, 3
rep stosb


:facepalm:

Name: Anonymous 2018-01-24 14:41

>>90
This is why languages that require you to break down every operation on arrays into detailed loops are stupid by the way.
I agree, but only because of the qualifier about 'every operation'. most things people use loops for could be expressed with map/filter/reduce without losing readability - and it would be better for the more advanced compiler optimizations. still, most things are not the same as all things - there are things that are just plain easier to understand with loops: writing something like a multimedia codec (or even that ASCII->GSM-7 converter from a /prog/ challenge) with just map would require an anal deformation of your brain far worse than the one required to program in Forth

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List