From owner-freebsd-chat@FreeBSD.ORG Wed Apr 21 15:19:18 2004 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59B3316A4CE for ; Wed, 21 Apr 2004 15:19:18 -0700 (PDT) Received: from mx.tele-kom.ru (mx.tele-kom.ru [213.80.148.6]) by mx1.FreeBSD.org (Postfix) with SMTP id D93E343D4C for ; Wed, 21 Apr 2004 15:19:16 -0700 (PDT) (envelope-from doublef@tele-kom.ru) Received: (qmail 88065 invoked by uid 555); 21 Apr 2004 20:52:34 +0400 Received: from shark (213.80.149.229) by t-k.ru with TeleMail/2 id 1082566353-88058 for luke@foolishgames.com; Wed, 21 Apr 20:52:33 2004 +0400 (MSD) Received: by shark (Postfix, from userid 1000) id 01F7213E; Wed, 21 Apr 2004 20:28:38 +0400 (MSD) Date: Wed, 21 Apr 2004 20:28:37 +0400 From: DoubleF To: Daniela Message-ID: <20040421162837.GA296@Shark.localdomain> Mail-Followup-To: DoubleF , Daniela , Lucas Holt , freebsd-chat@freebsd.org, Miles Lubin 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline In-Reply-To: <200404202139.53518.dgw@liwest.at> User-Agent: Mutt/1.4.2.1i cc: Lucas Holt cc: freebsd-chat@freebsd.org cc: Miles Lubin Subject: Re: Beginning C++ in FreeBSD X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2004 22:19:18 -0000 --+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--