|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
i wonder how much it might be.
my guess is 4 for average short function about 20 lines x 80 characters. i know it is very difficult to come up with some "average c code" and "average asm code" .... nevertheless someone might have some experience. - thanks |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
ca1 wrote:
> i wonder how much it might be. > my guess is 4 for average short function about 20 lines x 80 > characters. > i know it is very difficult to come up with some "average c code" and > "average asm code" .... nevertheless someone might have some > experience. > - thanks The answer would be different for different pieces of code and for CISC vs. RISC architectures. Generally the assembler equivalent of a segment of C code tends to be several times as long in terms of lines. Some assembler dialects can have multiple instruction mnemonics in a single line and of course C code can be written in wide ranging manner with regard to vertical space. Compiler optimisation can dramatically affect this ratio to IME. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
In article <91fd63cd-5556-41d0-b4c5-e72781773b9f@m36g2000hse.googlegroups.com>,
ca1 <xchmelmilos@gmail.com> wrote: >i wonder how much it might be. >my guess is 4 for average short function about 20 lines x 80 >characters. >i know it is very difficult to come up with some "average c code" and >"average asm code" .... nevertheless someone might have some >experience. Completely unscientific experiment with a small number of small programs: about 6 2/3. -- "Do not on any account attempt to write on both sides of the paper at once." -- Walter C. Sellar |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
It is not a reliable metric. We have examples where several lines
of source yields one instruction and the converse is also true. w.. ca1 wrote: > i wonder how much it might be. > my guess is 4 for average short function about 20 lines x 80 > characters. > i know it is very difficult to come up with some "average c code" and > "average asm code" .... nevertheless someone might have some > experience. > - thanks |
|
![]() |
| Outils de la discussion | |
|
|