[comp.arch] String instructions; info on 4.3BSD ls

mash@mips.UUCP (04/01/87)

I've lost track of where, but someplace in this series John Gilmore
asked for the numbers on a Berkeley "ls", since the SYS V ones surprised
us.  They are given below (4.3+NFS).  So far, the main message I get out of all
of this is:
	DO YOU KNOW WHAT YOUR PROGRAMS ARE DOING TODAY?
	PROFILE THEM; YOU'LL BE SURPRISED.

126509 cycles: ls /usr/user

    cycles %cycles  cum %     cycles  bytes procedure (file)
                               /call  /line

     30364   24.00  24.00        221     26 _doprnt (doprnt.c)
     22207   17.55  41.56       3702     15 qst (qsort.c)
     11120    8.79  50.35         40     22 fcmp (ls.c)
      9198    7.27  57.62         23      7 strlen (strlen.c)
      6793    5.37  62.99       3397     16 qsort (qsort.c)
      6166    4.87  67.86         68      4 strcat (strcat.s)
      5112    4.04  71.90        639     12 morecore (malloc.c)
      4928    3.90  75.80        108     26 fmtentry (ls.c)
      3566    2.82  78.61         76     18 gstat (ls.c)
      3452    2.73  81.34         38      4 strcpy (strcpy.s)
      3345    2.64  83.99         10      5 strcmp (strcmp.s)
      2674    2.11  86.10         51     10 malloc (malloc.c)
      2530    2.00  88.10         55     23 cat (ls.c)
      1931    1.53  89.63       1931     20 getdir (ls.c)
      1921    1.52  91.15        961     28 formatf (ls.c)
      1906    1.51  92.65        953      5 bcopy (bcopy.s)
      1748    1.38  94.03         19     24 printf (printf.c)
      1631    1.29  95.32         34     13 readdir (readdir.c)
      1472    1.16  96.49         32     25 sprintf (sprintf.c)

711750 cycles: ls -l /usr/user

    cycles %cycles  cum %     cycles  bytes procedure (file)
                               /call  /line

    428392   60.19  60.19       1161     26 _doprnt (doprnt.c)
     41132    5.78  65.97         69      7 strlen (strlen.c)
     23687    3.33  69.30        551     31 fetchpw (getpwent.c)
     23416    3.29  72.59        510     16 offtime (localtime.c)
     23416    3.29  75.88        510     19 localtime (localtime.c)
     22207    3.12  79.00       3702     15 qst (qsort.c)
     11120    1.56  80.56         40     22 fcmp (ls.c)
     11006    1.55  82.10         38     20 getbit (ndbm.c)
      9764    1.37  83.48        213     11 fmtmode (ls.c)
      8832    1.24  84.72         32     25 sprintf (sprintf.c)
      6793    0.95  85.67       3397     16 qsort (qsort.c)
      6518    0.92  86.59         68      4 strcat (strcat.s)
      6287    0.88  87.47        147     17 dbm_access (ndbm.c)
      6192    0.87  88.34        144     11 dcalchash (ndbm.c)
      6103    0.86  89.20        130     18 gstat (ls.c)
      5698    0.80  90.00         37     13 detzcode (localtime.c)
      5308    0.75  90.74         42      5 bcopy (bcopy.s)
-- 
-john mashey	DISCLAIMER: <generic disclaimer, I speak for me only, etc>
UUCP: 	{decvax,ucbvax,ihnp4}!decwrl!mips!mash, DDD:  	408-720-1700, x253
USPS: 	MIPS Computer Systems, 930 E. Arques, Sunnyvale, CA 94086