home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / linux / 8684 < prev    next >
Encoding:
Text File  |  1992-08-20  |  3.8 KB  |  85 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!mcsun!sun4nl!alchemy!ruunfs!hooft
  3. From: hooft@fys.ruu.nl (Rob Hooft)
  4. Subject: Re: Jumptable Performance (Was: Re: shared libs - can everyone be happy with this?)
  5. Message-ID: <1992Aug20.104635.4677@fys.ruu.nl>
  6. Organization: Physics Department, University of Utrecht,  The Netherlands
  7. References: <1992Aug17.144719.1961@crd.ge.com> <1992Aug17.151311.29507@ods.com> <NOP.92Aug17135014@theory.Mankato.MSUS.EDU> <1992Aug18.080437.3944@fys.ruu.nl> <1992Aug18.140858.3484@crd.ge.com> <1992Aug18.154149.26416@fys.ruu.nl> <1992Aug19.125541.865@crd.ge.com>
  8. Date: Thu, 20 Aug 1992 10:46:35 GMT
  9. Lines: 74
  10.  
  11. In <1992Aug19.125541.865@crd.ge.com> davidsen@ariel.crd.GE.COM (william E Davidsen) writes:
  12.  
  13. >In article <1992Aug18.154149.26416@fys.ruu.nl>, hooft@fys.ruu.nl (Rob Hooft) writes:
  14.  
  15. >| Yes, that is what I expect too, but I didn't expect the usertime to go
  16. >| down at all, certainly not by over 0.5 seconds. We're talking a
  17. >| program here that runs for 25 hard CPU-seconds! I'll be timing again
  18. >| this evening, and might even retry the BYTE-bench this time. Twice,
  19. >| that is. I guess I'll be using jump-libs for the rest of my linux-life....
  20.  
  21. >  Like most things which seem too good to be true, I'm suspicious. Does
  22. >anyone have an explanation why adding size and instructions to every
  23. >library call would make the program use less user CPU (or appear to)?
  24. >Having used jump tables before I have to be suspicious.
  25.  
  26. I did not do the BYTE bench (couldn't find the source at home, have to
  27. re-download it), but I retried three different programs with a number
  28. of compilation and linking options. Measurements were done using the
  29. 'set time=1' option in tcsh. All measurements have been carried out 5
  30. times. Not all results are reproduced here: that would create a too
  31. long posting.
  32.  
  33. My preliminary conclusion is that the differences in timing for the
  34. fp-benchmarks are probably caused by accidental alignment differences,
  35. and that the real differences caused by the jump are too small to be
  36. measured. Especially the 'ls' benchmark, which should do about 1E5
  37. lib-calls, is convincing to me.
  38.  
  39. I would really like to see any feedback: please let me know what you
  40. think.
  41.  
  42. ======================================================================
  43. flops.c: (fp-benchmark)
  44.    gcc -O6 -funroll-all-loops -fomit-frame-pointer flops.c -s -o flops
  45.  
  46. -jump -N   :  1.8081 Mflops,  14.86u 0.06s (14.94 clocktime)
  47.               1.8144 Mflops,  14.86u 0.04s (14.90 clocktime)
  48.               1.8144 Mflops,  14.85u 0.05s (14.90 clocktime)
  49.               1.8207 Mflops,  14.86u 0.04s (14.90 clocktime)
  50.               1.8137 Mflops,  14.87u 0.03s (14.93 clocktime)
  51.  
  52. -N         :  1.7763 Mflops,  15.35u 0.03s (15.39 clocktime)
  53.  
  54. -static -N :  1.8020 Mflops,  15.07u 0.02s (15.10 clocktime)
  55.  
  56. -static    :  1.7880 Mflops,  15.13u 0.02s (15.16 clocktime)
  57.  
  58. -m486 -jump:  1.8175 Mflops,  14.86u 0.04s (14.92 clocktime)
  59.  
  60. ============================================================
  61. lorenz.c: (fp-benchmark)
  62.    gcc -N -O6 -funroll-all-loops -fomit-frame-pointer -s lorenz.c -o lorenz
  63.  
  64. -jump         :  60.31u 0.03s 1:00.40
  65. -m486 -jump   :  60.09u 0.03s 1:00.18
  66. -m486         :  60.40u 0.03s 1:00.50
  67. -m486 -static :  60.10u 0.02s 1:00.18
  68. ============================================================
  69. GNU ls: (does a lot of library calls!)
  70.   gcc -N ls.a -o ls
  71.   ./ls -lR / > /dev/null 
  72. (that was 5707 files on 3 64Mb minix partitions)
  73.  
  74. -jump     :  4.17u 5.64s  9.91
  75. (shared)  :  4.12u 5.57s  9.90
  76. -static   :  4.09u 5.66s  9.89
  77.  
  78. (Considering the "large" differences between test results, these
  79.  three programs have "exactly" the same performance).
  80. ============================================================
  81. -- 
  82. Rob Hooft, Bijvoet Center for Biomolecular Research, 
  83. Chemistry department University of Utrecht, the Netherlands
  84. hooft@hutruu54.bitnet hooft@chem.ruu.nl hooft@fys.ruu.nl hooft@cc.ruu.nl
  85.