Date: Wed, 21 Apr 2004 20:28:37 +0400 From: DoubleF <doublef@tele-kom.ru> To: Daniela <dgw@liwest.at> Cc: Miles Lubin <miles@lubin.us> Subject: Re: Beginning C++ in FreeBSD Message-ID: <20040421162837.GA296@Shark.localdomain> In-Reply-To: <200404202139.53518.dgw@liwest.at> References: <200404151110.i3FBAaoo048373@adsl-68-76-19-75.dsl.klmzmi.ameritech.net> <200404171050.29467.dgw@liwest.at> <20040417123848.GA244@Shark.localdomain> <200404202139.53518.dgw@liwest.at>
next in thread | previous in thread | raw e-mail | index | archive | help
--+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [When I say `moving to chat@', I mean it] On Tue, Apr 20, 2004 at 09:39:53PM +0000, Daniela probably wrote: >=20 > Part of the reason why I love assembly is that I hate being limited and n= ot=20 > being able to do *exactly* what I want. >=20 Fortunately, things like 'running into a wall' don't happen all that often in UN*X world, do they? I wouldn't say that FreeBSD, for instance, is hiding its power. Even with C, it's all there --- that is, if you need power, not speed. Back in the days of DOS, I needed to work around some marasmatic conventions or limitations, but now I just don't feel the need to do that. After a bit of recalling, I think I didn't feel it since the very first installation day... > And if I want it to be fast ... Undoubtedly, today you can hand-optimize your code to run faster. But there are certain problems (I'm not touching compatibility problems here, they're known to you): 1) what you have written to be optimal for an AMD processor may be suboptimal for an Intel processor, and vice versa, and Intel and AMD aren't the only companies out there; 2) what you have written to be optimal for a Pentium P54C (read: Pentium 1; that's what I'm sitting in front of now) processor may be suboptimal even for a P6 (Pentium Pro) processor, because their architectures are different; 3) (a bit more serious) it's not difficult to manage the 8 basic 32-bit registers (okay, maybe 7:)) efficiently, but do you think you can do the same with 16 64-bit registers of the AMD 64-bit processor? not sure about you, but I wouldn't bet I can outoptimize a good compiler there; 4) it's not difficult to write instructions one by one, but it's not easy for the processor to process them that way , so Intel's 64-bit architecture wants you to pack 3-s of instructions into chunks. I think 3 is an odd number of instructions to have in a 128-bit chunk:). This definitely doesn't make assembly programmer's life easier either. (3 and 4: just look at the manuals of the respective architectures and see, for instance, how the 3-convention makes IA-64 assembly unreadable --- just MHO). >=20 > I'd give up all the comforts of a high-level language even for no particu= lar=20 > reason. Every programming language is fun and easy in it's own way. For m= e,=20 > ASM in not just a last resort. >=20 --=20 DoubleF The universe does not have laws -- it has habits, and habits can be broken. --+HP7ph2BbKc20aGI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAhqE1wo7hT/9lVdwRAinZAJsEUaQuY9aJ1c14F1dg4/ULKQSUeQCdH+na ju781ULRk6AUbqiOlHNiHJw= =9bwB -----END PGP SIGNATURE----- --+HP7ph2BbKc20aGI--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040421162837.GA296>