FPC for DOS / FreeDOS (DOSX)
> Take e.g. delphi or other wirthian languages, and you'll see it otherwise.
> Slow compiling is a notorious C/C++ problem, not a HLL problem. It
> originates in the constant reinterpretation of headers
It seems that OpenWatcom is faster to compile than GCC. And its output gets about 85% of GCC's speed. But yeah, I do wonder why no C compiler ever bundles all the .H files into one big database (since they aren't updated often).
> It is more from when I was young and had some BBS software in assembler
> long ago
If people still used 486s or non-superscalar architectures (e.g. VIA ?), they'd probably all be assembly programmers. But since clock speed (and cpu improvements) have all gotten better, it's less of an issue ... in most cases. Still, I wonder who is completely satisfied with 100% of their programs and thinks they don't need to be any faster. (Any compiler/compressor could be ideally faster.)
> And in general, if projects get larger, you simply want to catch every bug
> where and when you can, _before_ you have to compile with debug info.
Uh, I wouldn't call C++ the easiest thing to debug (but to be fair, I don't know or use it).
> So you don't use any software written by others on your 486?
99% of the software I (rarely) use on my 486 is written by someone else. I'm not one of the geniuses that writes their own OS and all the apps (although they do exist). Just trust me, in case you've forgotten, a 486 is slow! Therefore, you are bound to say, "Man, this is annoying, couldn't it be faster?" Even using a P166 is much much less annoying (approx. 10x faster). Heck, even using my P4 w/ XP makes me irritated sometimes.
> Well, maybe if you invested the same amount of time in the HLL code as in
> your handtuned assembler, than it would.
No. The compiler is inherently limited, pure assembly is not. It doesn't mean you can't optimize at the HLL level (search Google for C optimizations), but their generic optimizations don't always pan out.
> The point is not the assembler,
> but the invested time to speed it up. Most engineers don't want to invest
> those magnitudes of time for something that is old hat in two years.
The problem here is that you're assuming everyone has newest, latest Core 2 "Penryn" processors with quad cores, etc. Sure, those are very fast (supposedly, never tried myself). But 95% of the world doesn't use those yet. So you can code blissfully ignorant of the whole world or you can spend time working towards that which is slower but still functional.
BTW, assembly doesn't usually get slower with newer processor upgrades. Sure, the advantage can disappear (see HA C-- rewrite), but the person writing it had a tangible reason to: his own personal computer. If you don't have a 486, you won't write for one. It's personal when you do, though, because you want it to run faster.
> If you finish such project for larger pieces of software, you can start
> rewriting it for newer processors before it is finished.
Sure, if you have infinite amounts of money and are willing to upgrade your cpu. Most people don't do that, however.
> I do agree they could speed up some very much used primitives (and
> compression is certainly one of them) on x86, and keep the C code for the
> rest (and afaik most compression already contains asm)
Only the best compressors have asm speedups. The rest just wimp out and say, "Good enough" (and that's probably fair in some cases). But just FYI, there are reasons why Zip/Gzip (Deflate) and BZip2 (BWT) are still popular despite much better compression available: low memory footprint and fast.
> > And in case you haven't noticed my previous posts, 7ZA + HX is
> > much faster than p7zip (DJGPP).
>
> And that proves exactly WHAT? THat you and japeth put in more time for
> some optimizing?
p7zip is pure C/C++ (last I checked) while HX is definitely not. (And I had no involvement in writing any code for that.) You cannot expect pure HLL to always be faster than all pure assembly. In fact, it IS assembly (once translated).
> FASM or Octasm (both written in themselves) are faster than YASM (C)
> which is faster than NASM (C).
>
> That only proves that you care more about speed than the YASM and NASM
> authors. Not that asm is superior
The YASM and NASM I use are DOS/DJGPP compiles, and DJGPP is not the best optimizing compiler (although fairly good). So that makes a difference too.
"Bare" Assembly (language) is of course superior because without it you can't run anything! Even HLL all becomes assembly eventually. It doesn't mean you should write everything in pure assembly. A skilled coder who knows what he/she is doing can outmatch a braindead compiler any day. But HLLs have advantages too, just not 100% of the time (which I hope you aren't advocating).
Complete thread:
- HX-DOS Extender & Virtual Pascal 2.1.279 - ho1459, 14.03.2008, 14:28
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- HX-DOS Extender & Virtual Pascal 2.1.279 - Japheth, 15.03.2008, 11:26
- HX-DOS Extender & Virtual Pascal 2.1.279 - Rugxulo, 16.03.2008, 19:15
- HX-DOS Extender & Virtual Pascal 2.1.279 - ho1459, 17.03.2008, 21:07
- HX-DOS Extender & Virtual Pascal 2.1.279 - marcov, 07.04.2008, 11:45
- HX-DOS Extender & Virtual Pascal 2.1.279 - Rugxulo, 07.04.2008, 23:27
- HX-DOS Extender & Virtual Pascal 2.1.279 - marcov, 08.04.2008, 13:28
- HX-DOS Extender & Virtual Pascal 2.1.279 - Rugxulo, 08.04.2008, 15:58
- HX-DOS Extender & Virtual Pascal 2.1.279 - marcov, 10.04.2008, 10:02
- FPC for DOS / FreeDOS - Rugxulo, 11.04.2008, 07:14
- FPC for DOS / FreeDOS - marcov, 11.04.2008, 13:08
- FPC for DOS / FreeDOS - Rugxulo, 11.04.2008, 15:50
- FPC for DOS / FreeDOS - Japheth, 11.04.2008, 17:22
- FPC for DOS / FreeDOS - marcov, 11.04.2008, 19:50
- FPC for DOS / FreeDOS - Rugxulo, 12.04.2008, 00:43
- FPC for DOS / FreeDOS - marcov, 12.04.2008, 14:38
- FPC for DOS / FreeDOS - Rugxulo, 12.04.2008, 20:52
- FPC for DOS / FreeDOS - marcov, 13.04.2008, 23:36
- FPC for DOS / FreeDOS - Rugxulo, 14.04.2008, 20:40
- FPC for DOS / FreeDOS - marcov, 14.04.2008, 21:59
- FPC for DOS / FreeDOS - Rugxulo, 15.04.2008, 01:45
- FPC for DOS / FreeDOS - marcov, 15.04.2008, 16:11
- FPC for DOS / FreeDOS - Rugxulo, 16.04.2008, 02:23
- FPC for DOS / FreeDOS - marcov, 15.04.2008, 16:11
- FPC for DOS / FreeDOS - Rugxulo, 15.04.2008, 01:45
- FPC for DOS / FreeDOS - marcov, 14.04.2008, 21:59
- FPC for DOS / FreeDOS - Rugxulo, 14.04.2008, 20:40
- FPC for DOS / FreeDOS - marcov, 13.04.2008, 23:36
- FPC for DOS / FreeDOS - Rugxulo, 12.04.2008, 20:52
- FPC for DOS / FreeDOS - marcov, 12.04.2008, 14:38
- FPC for DOS / FreeDOS - Japheth, 12.04.2008, 07:33
- FPC for DOS / FreeDOS - marcov, 12.04.2008, 13:27
- FPC for DOS / FreeDOS - Japheth, 12.04.2008, 16:18
- FPC for DOS / FreeDOS - marcov, 13.04.2008, 02:54
- FPC for DOS / FreeDOS - Japheth, 13.04.2008, 09:50
- FPC for DOS / FreeDOS - marcov, 13.04.2008, 23:17
- Compiler debate - Steve, 14.04.2008, 05:51
- FPC for DOS / FreeDOS - Japheth, 14.04.2008, 08:49
- FPC for DOS / FreeDOS - marcov, 13.04.2008, 23:18
- Compiler debate - Steve, 14.04.2008, 06:00
- FPC for DOS / FreeDOS - Japheth, 14.04.2008, 08:21
- FPC for DOS / FreeDOS - marcov, 14.04.2008, 11:12
- FPC for DOS / FreeDOS - Japheth, 14.04.2008, 12:52
- FPC for DOS / FreeDOS - Steve, 14.04.2008, 15:05
- FPC for DOS / FreeDOS - marcov, 14.04.2008, 11:12
- FPC for DOS / FreeDOS - marcov, 13.04.2008, 23:17
- FPC for DOS / FreeDOS - Japheth, 13.04.2008, 09:50
- FPC for DOS / FreeDOS - marcov, 13.04.2008, 02:54
- FPC for DOS / FreeDOS - Rugxulo, 12.04.2008, 20:34
- FPC for DOS / FreeDOS - Japheth, 12.04.2008, 16:18
- FPC for DOS / FreeDOS - marcov, 12.04.2008, 13:27
- FPC for DOS / FreeDOS - Rugxulo, 12.04.2008, 00:43
- FPC for DOS / FreeDOS - Rugxulo, 11.04.2008, 15:50
- FPC for DOS / FreeDOS - marcov, 11.04.2008, 13:08
- FPC for DOS / FreeDOS - Rugxulo, 11.04.2008, 07:14
- HX-DOS Extender & Virtual Pascal 2.1.279 - marcov, 10.04.2008, 10:02
- HX-DOS Extender & Virtual Pascal 2.1.279 - Rugxulo, 08.04.2008, 15:58
- HX-DOS Extender & Virtual Pascal 2.1.279 - marcov, 08.04.2008, 13:28
- HX-DOS Extender & Virtual Pascal 2.1.279 - Rugxulo, 07.04.2008, 23:27
- HX-DOS Extender & Virtual Pascal 2.1.279 - ho1459, 17.03.2008, 20:56
- HX-DOS Extender & Virtual Pascal 2.1.279 - Rugxulo, 16.03.2008, 19:15
- HX-DOS Extender & Virtual Pascal 2.1.279 - Laaca, 15.03.2008, 18:56
- HX-DOS Extender & Virtual Pascal 2.1.279 - rr, 16.03.2008, 19:12
- HX-DOS Extender & Virtual Pascal 2.1.279 - Japheth, 15.03.2008, 11:26
Mix view