Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!paperboy!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: Execution time bottleneck: How to speed up execution? Message-ID: <26862:Feb1416:46:4391@kramden.acf.nyu.edu> Date: 14 Feb 91 16:46:43 GMT References: <2934@charon.cwi.nl> <24587:Feb1411:32:5391@kramden.acf.nyu.edu> <2940@charon.cwi.nl> Organization: IR Lines: 27 Dik, the optimizations I posted in a previous article are responsible for between a 4% and a 50% speedup, depending on your machine, your compiler, etc. This isn't the speedup you get from an optimizing compiler. This isn't the speedup you get from buying a new machine. This is the speedup from the ``ludicrous'' ``micro-optimization'' that you took such pains to criticize. In article <2940@charon.cwi.nl> dik@cwi.nl (Dik T. Winter) writes: > (and indeed you find 4% and 10% respectively; the > 10% probably due to the vectorization). As I said the first time, the 10% is the speedup you get on a Convex with the standard math library exp() when you apply the ``ludicrous'' optimizations I pointed out. It is not due to vectorization. > You gave just a few random solutions that result in a 4% speedup on a Sun, > while the suggestion I did can give large improvements. Yes, and I could equally well have said ``buy a Cray.'' If the original poster didn't have a Cray this would result in ``large improvements.'' Similarly, the code becomes quite a lot faster if the poster uses a fast exp()---but do you really think that ``use a fast exp()'' is any more helpful than ``buy a Cray''? No. Neither one answers the question. Furthermore, if the poster *does* have a fast exp() running on his Cray, the optimizations I posted will give an even better speedup. ---Dan