ian@wcwvax.UUCP (Ian Kemmish) (03/04/88)
In article <11843@sgi.SGI.COM> (Mark Callow) writes: > When I was porting NeWS to the mips, I looked at these C routines and > concluded it would be hard to do proper overflow checking in a C > language version. I implemented the routines in mips assembler using > the 68020 assembler version and the comments in fract.c as a guide. In > retrospect, I can see that some judicious comparisons of signs would > probably have worked. I've never written written a line of MIPS assembler after my first week's exposure to the chips. I did the overflow checking in C, in a really simple-minded textbook way. Running the disassembler on it a few seconds ago revealed a grand total of seven extra instructions (at the most) over doing it by hand in assembler. That's less than half a microsecond on our machine. And since one of the other wonderful compiler tools on the MIPS is a decent profiler (you can even go down to single lines) I have a pretty good idea what that half microsecond means as an overall performance overhead in my NeWS port. I've just done an assembler-less port of Kyoto Common Lisp, too. With the new chips and compilers, writing in assembler (to get speed) is rapidly running into the law of diminishing returns. I wouldn't mind betting that writing in assembler for a machine like the Multiflow might actually slow things down...:-) Ian Kemmish Whitechapel Workstations UUCP: ian@wcw.co.uk 75 Whitechapel Road OLDUUCP: ..!mcvax!ukc!wcwvax!ian London PHONE: (+44) 01 377 8680 E1 1DU FAX: (+44) 01 247 4589 England TELEX: (UK) 885300 WCW G "It's even tougher at the bottom"