flat assembler
Message board for the users of flat assembler.
Index
> Main > Grasping the idea of assembly taking up linearly more code. |
Author |
|
bitRAKE 19 Jun 2023, 14:58
Unsure what the original YouTube comment intended, but I can share some thoughts on the matter ...
I would say that any language can efficiently [by length] code a problem that fits that language's model for computation. Even assembly languages have different paradigms. Implementing a problem in a language is a function of the programmer. What this means is that experience and understanding improves one's ability to express problems in a language. Take the typical computer science problem of expressing a function to compute the Fibonacci sequence. It really doesn't apply to x86 because it's a single instruction, XADD. [Usually, the problem is trying to demonstrate something else (i.e. recursion, memorization, ...).] But most programming languages lack that instruction, and/or use a different model for computation. It's important to be able to express a problem in different models of computation. The same can be said for spoken/written languages. They can include a lot of context inherent in the phrasing. Quote: Limited human growth rate ensures we are all indoctrinated to some extent into the culture and communities of our upbringing. As for RPN, there are efficiencies in using that model for computation - both in data structure and operations - which seem to mesh well with assembly, but RPN is not inherently assembly related, imho. Using RPN explicitly in assembly would mean imposing a constraint on one's assembly coding to the RPN model. I can also imagine this question in "High Level Languages" or "Programming Language Design" ... guess we'll need to see where the conversation goes ... _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup Last edited by bitRAKE on 19 Jun 2023, 16:09; edited 2 times in total |
|||
19 Jun 2023, 14:58 |
|
revolution 19 Jun 2023, 15:03
Linear just means a simple multiplier.
So C_CODE * multiplier == ASM_CODE So the question becomes "What is the multiplier?" Is it 0.1? Or pi? Or 666? |
|||
19 Jun 2023, 15:03 |
|
Furs 20 Jun 2023, 13:29
revolution wrote: Linear just means a simple multiplier. Exponential would mean the more C code you write, the more and more and more asm code you'll have to write for it (which is nonsense). So even if 5 lines of C code can be done in 15 lines of asm, you'd need 1000 lines of asm for 20 lines of C code, etc. That's the exponential idea. This is just hypothetical example with random numbers. |
|||
20 Jun 2023, 13:29 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.