🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.alpha
Article #7

speed of SYS$READEF

#7
From: George J. Carrette
Date: Tue, 22 Dec 1992 15:42
35 lines
1393 bytes
Since I am now running enough of my code to be curious about
speed, a question is how much speed-up an Alpha can be expected to
provide on realtime programs. The program READEF tests one
of the basics, SYS$READEF, by calling it N times in a loop.
Thus:

   $ write sys$output f$getsyi("HW_NAME")
   DEC 3000 Model 500
   $ readef 1000000
    ELAPSED:    0 00:00:02.60  CPU: 0:00:02.60  BUFIO: 0  DIRIO: 0  FAULTS: 0

   $ write sys$output f$getsyi("HW_NAME")
   VAXstation 4000-90
   $ readef 1000000
    ELAPSED:    0 00:00:03.65  CPU: 0:00:03.49  BUFIO: 0  DIRIO: 0  FAULTS: 2

Does anybody else think that SYS$READEF could use some tuning here?

#include <stdio.h>
#include <stdlib.h>
#include <lib$routines.h>
#include <starlet.h>

/* time a bunch of calls to sys$readef */

main(int argc, char **argv)
{long j,n,mask,status;
 n = (argc > 1) ? atol(argv[1]) : 100000;
 status = lib$init_timer(0);
 if (!(status & 1)) lib$signal(status);
 for(j=0;j<n;++j)
   {status = sys$readef(0,&mask);
    if (!(status & 1)) lib$signal(status);}
 status = lib$show_timer(0);
  if (!(status & 1)) lib$signal(status);}
Technical Details
Message-ID: <4174@mitech.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!mitech!gjc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mitech!gjc
From: gjc@mitech.com (George J. Carrette)
Newsgroups: vmsnet.alpha
Subject: speed of SYS$READEF
Message-ID: <4174@mitech.com>
Date: 22 Dec 92 15:42:44 GMT
Organization: Mitech Corporation, Concord MA
Lines: 36