News for hackers. Stuff that matters.
Re:A forum engine written in Assembly by rafram on Sunday August 27, 2023 @03:36PM (#37285891)
I don’t think that’s actually true. Compilers write machine code that’s often much more efficient than anything you could think up by hand, and the bulk of the disk space/memory used by a modern executable is for resources/strings, not instructions. Stereotypical assembly code - extremely lean routines that accept minimal user input and don’t create human-readable output - is indeed smaller than a stereotypical compiled executable, but you’d have trouble beating the compiler 1:1 on the same problem.
Re:A forum engine written in Assembly by jacquesm on Sunday August 27, 2023 @04:27PM (#37286330)
But you won't be writing the same code as the code that you would write in a high level language, and that is sort of the point. You're going to do your utmost not to write such code because then you might as well break out the C compiler.
Re:A forum engine written in Assembly by djur on Sunday August 27, 2023 @11:52PM (#37289536)
Assuming that such code is suitable or even feasible for the problem you're attempting to solve. High-level languages were created specifically for the purpose of writing large, complex software systems. We don't see assembly being used for those systems. Isn't there an argument that high-level languages are simply more fit for that purpose?
Re:A forum engine written in Assembly by rahen on Sunday August 27, 2023 @06:45PM (#37287367)
I don't think so, modern high level languages tend to be linked to huge runtimes that are usually load entirely in memory. Assembly programs don't.
Re:A forum engine written in Assembly by djur on Sunday August 27, 2023 @11:50PM (#37289512)
If you're not linking to those runtimes and system libraries you're reimplementing them. The functionality has to come from somewhere.
Re:A forum engine written in Assembly by rahen on Monday August 28, 2023 @08:52AM (#37293190)
That's what assembly programmers do, they re-use code. They just don't need to ship huge runtimes to be then loaded into memory.