Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!udel!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!ram From: ram+@cs.cmu.edu (Rob MacLachlan) Newsgroups: comp.arch Subject: Re: Compilers and efficiency Message-ID: <1991Apr8.234916.27314@cs.cmu.edu> Date: 8 Apr 91 23:49:16 GMT References: <27fa3350.6bc2@petunia.CalPoly.EDU> <1991Apr5.172533.6717@agate.berkeley.edu> <9782@mentor.cc.purdue.edu> Sender: netnews@cs.cmu.edu (USENET News Group Software) Organization: School of Computer Science, Carnegie Mellon Lines: 17 >From: hrubin@pop.stat.purdue.edu (Herman Rubin) >Subject: Compilers and efficiency >Date: 7 Apr 91 19:04:12 GMT > >For example, suppose there was an instruction, which could be effectively >used, which would divide a float by a float, obtaining an integer quotient >and a float remainder. Now just how is the compiler to recognize that this >is in fact wanted? > >There is, at present, no language designed to take into account the collection >of "natural" useful hardware which the present users can find uses for, and >which are far more expensive in software than in hardware. Well, in Common Lisp, (truncate 3.5 .5) returns 3 (an integer) and .5 (a float). Rob