Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Re: tlug-digest Digest V2004 #194
- Date: Fri, 30 Jul 2004 11:28:54 +0900 (JST)
- From: Joe Larabell <larabell@???>
- Subject: Re: [tlug] Re: tlug-digest Digest V2004 #194
- References: <200407290224.i6T2O6Ks002212@example.com><20040729233553.GA648%jmglov@example.com> <41099E80.40307@example.com>
> ... Is it so unusual to > inline Assembler? These days, it should be unheard of (except at the very lowest level of the O/S). > ... I know on Windows we used for graphics all the time > DirectX, in old DOS-timess we rewrote all the graphic-routines we needed > and wrote those we will need completely Assembler,,, Back in the days when compilers were pretty stupid, it sometimes made sense to re-write things in assembly to squeeze out a bit of extra speed. But about 20 years ago I had an in-depth debate with a compiler writer and he convinced me that a good compiler could be able keep track of more stuff optimization-wize than even the best assembly coders and I'm sure today's compilers are even better. I did a consulting gig years ago where the guy before me had inlined a bunch of assembly in a C program. I thought the assembly looked kinda funny and, oddly enough, it had C-like comments embedded in the source. After some experimentation, I found that the inlined assembly was actually the output of the C compiler, no doubt captured from a previous compile run. Duhhh... Assembly is not any faster than C unless you have a really dumb compiler or you're bit-twiddling at the hardware level. Those cases *are* rare. [Note: the same comparison cannot be made between, say, C and Perl, because the latter does a lot of behind-the-scenes stuff that takes additional CPU time. C does not. So while it makes little sense to inline assembler in C, it could make a big difference inlining C into a Perl script if you know what you're doing.] -- Joe Larabell -- Synopsys VCS Support US: larabell@example.com http://wwwin.synopsys.com/~larabell/ Japan: larabell@?jp
- Follow-Ups:
- Re: [tlug] Re: tlug-digest Digest V2004 #194
- From: Stephen J. Turnbull
- References:
- [tlug] Re: tlug-digest Digest V2004 #194
- From: Jim Breen
- Re: [tlug] Re: tlug-digest Digest V2004 #194
- From: Josh Glover
- Re: [tlug] Re: tlug-digest Digest V2004 #194
- From: Niels Kobschaetzki
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Re: tlug-digest Digest V2004 #194
- Next by Date: Re: [tlug] Re: tlug-digest Digest V2004 #194
- Previous by thread: Re: [tlug] Re: tlug-digest Digest V2004 #194
- Next by thread: Re: [tlug] Re: tlug-digest Digest V2004 #194
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links