News for hackers. Stuff that matters.
Re:A forum engine written in Assembly by jacquesm on Sunday August 27, 2023 @04:21PM (#37286291)
Yes you will. Because you can't afford to write code like a modern optimizing compiler. You're going to have the same kind of linecount that you have in your high level language projects and those lines will compile down to a few bytes each at most.

Assembly language binaries tend to be extremely small compared to equivalent code written using a high level language. But: you'll easily spend 10x the time on them. The 'modern optimizing compiler' argument is at the function level: where you write a function using assembly and then write a similar function using a high level language (but still a compiled one, obviously). Yes, the compiler will probably win that race. But an assembly language programmer isn't going to write their code like that at all.

They will reduce the task to the point where it is manageable and that alone will save far more code than the compiler can ever remove. Assembly is (and assembly language based applications are) utterly bloat free, you do what you have to do and nothing more. You can use registers in ways that a compiler would never even think of because you can globally optimize.

No stack frames if you don't need them. No memory accesses if you don't need them.

But code that is hard to maintain and that likely will not be easy to work on with multiple people. 100 KLOC (including comments) -> 16Kb output. No high level language would even begin to approach that.

Re:A forum engine written in Assembly by kaba0 on Monday August 28, 2023 @02:02AM (#37290348)
> They will reduce the task to the point where it is manageable

If they don’t even solve the problem, then it is no competition.