home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6799 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  7.2 KB

  1. Path: news.vol.it!news
  2. From: bizzetti@mbox.vol.it (Fabio Bizzetti)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: AB3D II beats Quake....
  5. Date: 1 Apr 1996 02:16:15 GMT
  6. Organization: Video On Line
  7. Distribution: world
  8. Message-ID: <6932.6665T243T2605@mbox.vol.it>
  9. References: <4jbkpc$mbr@mopo.cc.lut.fi> <1434.6662T1116T1344@epma.demon.co.uk>
  10. NNTP-Posting-Host: molcl8.vol.it
  11. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  12.  
  13.  
  14. >>>C is slow as hell, and if you say "it's fast enough with a 700Mhz CPU" then
  15. >>>I tell you that also assembly becomes faster with the 700Mhz CPU. You're
  16. >>>running away from your shadow: ASM will always be losta faster and better
  17. >>>than C.
  18.  
  19. >F(l)abio, ;-)
  20.  
  21. >I agree with you that 68000 is neccesary to get the best out of the
  22. >amiga, not many demos etc. are written in C (thank god!).  However you are
  23. >wrong to assume that compilers cannot generate code as well as humans.  As we
  24. >are moving into the RISC era, CPUs have fewer instructions which are a lot
  25. >easier for a compiler to make great code with, in fact on certain mainframe
  26. >systems compilers generate code which is as fast as we could write in asm.
  27.  
  28. Yes :) but why it must be asm or C? :)
  29. you can help asm a lot, as machine language already is through asm mnemonics.
  30. I see it as "high level assembly" support, just call it advanced macros,
  31. subroutines where it suits (dos, not fast I/O, OS interfaces, etc..).
  32. Coding all these boring parts in asm, is like writing a program in machine
  33. language ("binary").
  34. tradition tends to associate assembly with nothing else than assembly.
  35. example: why can't we just have the 680x0 opcode "CLR.L A0" instead of always
  36. using "SUB.L A0,A0"? is it that shameful to add a pseudo instruction?
  37. or, why dont we just use subroutines for Load/Save operations, making them
  38. use variables and saving all registers contents, thus being able to mix
  39. these virtual Load/Save/Rename/etc.. instructions with pure ASM? Without
  40. being worried to save registers and optimize speed where it would be all
  41. wasted by dos.library itself, but instead optimize the flexibility of the
  42. code to use these dos instructions as if they were part of the CPU instruction
  43. set. Or, what's wrong in having IF/THEN/ELSE "assembly" instructions when it's
  44. possible to make them as fast as the best asm possible? but there're a lot
  45. of cases in which you really need asm to do things, but it's only fun IMO.
  46. You can write macros, or do just like I did; writing a program that gets your
  47. mixed asm / high_level_asm sources and features advanced "macros" to
  48. translate the hla parts into asm source in output. You give a mixed hla/asm
  49. source in input, you get a only-asm source (also commented) in output.
  50. Other advantage? you can have more than 1 instruction in a line.
  51. Well, this is not a real compiler, nor a high level language, this is just
  52. high level assembly, and it is different than assembly as much as assembly
  53. is different than machine-language: easier, not slower indeed.
  54.  
  55. I dont really like C, I like Basic for its semplicity maybe, but the only
  56. high level language I like is Forth, but it's an exception itself, being a
  57. futuristic machine language.
  58.  
  59. >As compilers become more intelligent we will see huge speed increases in
  60. >non-asm code speed which will effectively make asm obsolete,
  61.  
  62. Hmm.. dont really bet on it.
  63. There're 2 cases:
  64.  
  65. 1) asm gets too complex. In this case, I recall the old days of 6502 and it
  66.    seems hell compared to the (simpler) RISC cpu's of today, so dont really
  67.    think that in games/demos (including any application where speed matters)
  68.    it'll be difficult to code in *any* asm. It's just a question of getting
  69.    accustomed, nothing else. RISC brings us back into the complexity of the
  70.    past, but 8bit CPU's have been a beast that no modern CPU will make us
  71.    miss. If you say that with 8bit CPU's you had to spend 1 week for 10K of
  72.    code but today you'll need to fill 400K of code, then dont worry, because
  73.    if you help yourself with tools, you always get the best speed possible,
  74.    at least the 98%-99% if you want to. I mean, if it seemed natural to stop
  75.    coding in machine language (like on the Vic20, 169,8,141,15,144..) and use
  76.    assembly instead (like in the C64), why shouldn't we extend this "macros"
  77.    (mnemonics are just simple macros) to *anything* that can actually be made
  78.    using (more or less) advanced macros? There's a *lot* that can be done,
  79.    but we still can't call it a compiler because it's still 1:1 level with M/L.
  80. 2) If you think that C and ASM performaces get closer new CPU after new CPU,
  81.    I can't really agree. The reasons you explained before make people exploit
  82.    less the assembly advantages, for the implicit idea to keep on the tradition
  83.    with pure assembly, where they should know that assembly itself is already
  84.    not M/L. If C was really so good (and can't be, for definition, because it's
  85.    a portable language, thus cannot be optimized to the best possible), then why
  86.    dont they implement C facilitations into the CPU instruction set? The 68000
  87.    was made to support high level languages, but how come that the real power
  88.    of 680x0 comes out only with assembly, while the 80x86 was not optimized
  89.    so much for high level languages and allows to get so good C compilers?
  90.    The reason is that the more a cpu is versatile, the more the human can
  91.    get advantage on it, call it "heuristic" limits of compilers or any way,
  92.    but actually while i.e. the Chess aren't really a game of intelligence
  93.    (there's the alpha/beta algorithm to prove it), compilation and optimization
  94.    *need* intelligence because some cases cannot be studied and resolved by a
  95.    more or less generic algorithm, perhaps artificial intelligence could do
  96.    (that is already intelligence), but no compiler actually is capable of AI.
  97.  
  98. > after all why write a proggy in asm taking 12 months when you can do it in
  99. > C/C++ in 4-5???
  100.  
  101. I dont code in ASM, want my VK's fully HLA sources? ;)
  102. Who codes fully in ASM? at this point why not machine language? ;) it would
  103. be a waste of time, because the (advanced) macros can do all the mechanical
  104. work, while the true optimizations are still yours (this is high level assembly,
  105. not an high level language), and you get only the funny part, not the boring
  106. one.
  107.  
  108. >I hope this doesn't sound like a flame,
  109.  
  110. Dont worry
  111.  
  112. > I just want this thread to stop, you have your opinions and let everyone
  113. > else have their's, personally I can wait to see your VR Demos at the Saturne..
  114. > ;-)
  115.  
  116. ;-)
  117.  
  118. >Andy
  119.  
  120. The only people that I really can't "respect" is who comes out with no idea
  121. of what is talking about, just to talk..
  122. This is not your case though.
  123.  
  124.  
  125. Greets
  126.  
  127. >--
  128. >+---------------------------------====#====-----------------------------+
  129. >|              Andy Savage - Amiga Multimedia Programmer                |
  130. >|   Amiga, Drumming, Eastenders, Hamster, Tarantino and Worms fanatic   |
  131. >+---------------------------------====#====-----------------------------+
  132.  
  133.  
  134.  
  135.  
  136.   /-----------------------------------------------------------------------\
  137.   |  Fabio "Maverick" Bizzetti - bizzetti@mbox.vol.it - Maverick* at IRC  |
  138.   |            The maker of "CyberMan" and "Virtual Karting"              |
  139.   |              working on "VirtualRally" & "StarFighter"                |
  140.   \-----------------------------------------------------------------------/
  141.  
  142.  
  143.