🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.oberon
Article #1317

Oberon Task Statistics (Windows)

#1317
From: Doug Danforth
Date: Fri, 12 Apr 1996 15:13
71 lines
2536 bytes
Folks,
  Have you ever wondered how much time is consumed by a cycle
of an Oberon task loop?  I've run several small programs and
would like to report the following results for Windows 95 Oberon
V4:

One tick:  	1 millisecond.
TightLoop: 	10,000 cycles/tick ( 60 MHZ Pentium)
  "             30,000    "         150  "    "
Task:      	50 ticks
Others.Wait:	50 ticks


Where by TightLoop I mean
	lastTime := Oberon.Time();
	i:=0; WHILE i<10000000 DO INC(i) END;
	time := Oberon.Time();

and by Task I mean

	PROCEDURE Start;
	BEGIN
	(* install Oberon.Task timer *)
	END Start;
	
	PROCEDURE Timer;
	BEGIN
	(* measure time from last activation of me *)
	END Timer;
	
	PROCEDURE Stop;
	BEGIN
	(* remove timer task *)
	END Stop;

And by Others.Wait I mean

	PROCEDURE Wait;
	BEGIN
	  IF Windows.GetMessage THEN 
	    Windows.TranslateMessage;
	    Windows.DispatchMessage;
	  END
	END Wait;

We see that the Oberon loop is totally dominated by the Windows
message handling mechanism (I belive WinV4 actually uses a
Windows Timer to call itself?).

This means that splitting a procedure into two task introduces 500,000 to 
one overhead! (2x -> (T+x) + (T+x)  where T >>> x).

I had not noticed this massive constraint until I switched from
Win3.11 to Win95 and my speech recording quality degraded (I am
pumping bytes into a modem which must be done in "real-time").
(I no longer have Win3.11 available so can not check the change
in task swap time).

Final note: The values of "50" are average, ranging from lows of
4 to highs of 110.

-Doug
-- 
-----------------------------------------------------------------------------
  Douglas G. Danforth, Ph.D.                       danforth@csli.stanford.edu
  Visiting Scholar                                 (415)723-2487 x332 vox  
  Applied Speech Technology Lab                    (415)725-2166 fax
  Center for the Study of Language and Information
  Ventura Hall                    
  Stanford University, Stanford CA.  94305-4115             
-----------------------------------------------------------------------------
Technical Details
Message-ID: <danforth.829320260@Turing.Stanford.EDU>
Path: arc1-ca.pugleaf.net!Turing.Stanford.EDU!danforth

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!Turing.Stanford.EDU!danforth
From: danforth@Turing.Stanford.EDU (Doug Danforth)
Newsgroups: comp.lang.oberon
Subject: Oberon Task Statistics (Windows)
Date: 12 Apr 1996 08:13:36 -0700
Organization: Stanford University
Message-ID: <danforth.829320260@Turing.Stanford.EDU>
NNTP-Posting-Host: turing.stanford.edu
Keywords: Ticks, time, task
X-Newsreader: NN version 6.5.0 #1 (NOV)