Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ames!amdcad!tim From: tim@amdcad.AMD.COM (Tim Olson) Newsgroups: comp.arch Subject: Re: What with these Vector's anyways? [really string ops] Message-ID: <17780@amdcad.AMD.COM> Date: Fri, 31-Jul-87 12:02:06 EDT Article-I.D.: amdcad.17780 Posted: Fri Jul 31 12:02:06 1987 Date-Received: Sun, 2-Aug-87 01:02:29 EDT References: <218@astra.necisa.oz> <142700010@tiger.UUCP> Reply-To: tim@amdcad.UUCP (Tim Olson) Distribution: world Organization: Advanced Micro Devices, Inc., Sunnyvale, Ca. Lines: 38 Keywords: scalar vs. vectors, benchmarks In article <279@diab.UUCP> pf@.UUCP (Per Fogelstrom) writes: +----- | Be serious! Do you really belive in Dhrystone? Okay i do admitt that we don't | have anything better for the moment, but soon i hope. +----- I hope so, too. Dhrystone has been "twisted" by the translation from Ada to C (too much emphasis on string handling) and by the use of globally-optimizing compilers (code elimination) so much that it now should only be used as a *very* rough ballpark figure (unfortunately, people tend to like single figures-of-merit). There are on-going attempts to define new benchmarks; let's hope that some of these problems are being addressed. +----- | What this benchmark really tests is the compilers ability to remove code that | does'nt really do anything. And of course the cpu's ability to handle strings. | Just check the Am29000. The designers put in an instruction just to speed up | this benchmark.... Now what, have we reaced a new point, where cpu's are | designed for the bencmarks instead of vice versa, as it was before ???? +----- No, we didn't put in the cpbyte instruction to "speed up Dhrystone" -- it was added because many internal programs that we ran showed that such an instruction could be used to speed up C string handling (size unknown, string terminated by a \0) in general. Many processors have specialized instructions for strings -- Intel's 80x86 family (movs, cmps), AT&T's 32100 (strlen, strcmp), National's 32x32 family (movs, cmps), NEC's V70 (movc, cmpc), Fairchild's Clipper (movc, cmpc macros). However, most of these don't address "C-type" strings; they require a character count as a parameter. We were able to identify a single, simple instruction which increased the performance of C string handling. Others have also used this same technique in software to also obtain performance increases. -- Tim Olson Advanced Micro Devices (tim@amdcad.amd.com)