3 ms·
My eyes couldn't look away from the extra "= 0x01" at the top; it was driving me nuts. Glad he noticed it before the end of the video. The middle part got me
by richard_todd 10y ago
My eyes couldn't look away from the extra "= 0x01" at the top; it was driving me nuts. Glad he noticed it before the end of the video.
The middle part got me thinking: how helpful is it really, to write 50+ lines of high-level code, just to get 8 assembly instructions? I get that it's more readable and whatever, but seriously, I might rather write the 8 assembly lines and be done with it. Maybe I've spent too much time on comp.lang.forth lately :)
- unsignedqword 10y agoWell, you said it yourself: it's more readable; not to mention more easily maintainable and extensible. If we all sought to create the most terse code possible with no regard to any of the other important factors in creating 'good code', then we all might as well be writing everything in Pyth or APL. EDIT: I wouldn't say that all assembly is unreadable or anything like that (for instance, I find inline assembly easier and more readable than using compiler intrinsics for stuff like AMD64 SIMD instructions). I'm just saying that having more code around isn't exactly always a bad thing.