4 ms·
I was thinking it might be feasible to tackle Advent of Code in assembler if you started out with a good set of macros and a library for handling common data st
by mordechai9000 3y ago
I was thinking it might be feasible to tackle Advent of Code in assembler if you started out with a good set of macros and a library for handling common data structures and memory operations.
I personally would not be able to do that and keep up with the daily problems, but it might be fun.
- b5n 3y agoYou can get pretty far just by linking libc :)
- fluoridation 3y agoYou'd probably be better off with TCC or with GCC with -O0. Assembly can only outrun C when the programmer uses context-aware optimizations. If you're just using generic macros everywhere to piece together a solution you may as well just use a high-level language.
- mordechai9000 3y agoOh, I wasn't thinking of optimized code. It just sounds kind of fun. And it would still probably still beat anything that doesn't target machine code. But yeah, the compiler is going to produce better code than I can in most cases.
- fluoridation 3y agoIf it's for fun then sure, why not. What I meant was that you weren't really gaining any technical advantage by using Assembly like that.