🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2368

Re: TopSpeed 3.0 First Impressions

#2368
From: Thomas Schoebel
Date: Tue, 25 Jun 1991 10:52
46 lines
2596 bytes
In article <9782@sail.LABS.TEK.COM> toma@sail.LABS.TEK.COM (Tom Almy) writes:
>Language	Size	Speed	
>Modula-2 Nobuf	5620	 1.64
>Modula-2 Buf	6525	 0.87
>C Nobuf	4654	12.58
>C Buffered	4750	 0.93
>
>Making Modula-2 consistantly faster, but larger (at least for small programs).

I just got V 3.01 and played a little bit with a larger project (about
70 Modules, 750K source code in M2).

Impressions:
The OS/2 version did compile and run without problems when moving from
V 2.X. To get the DOS version run (moving from V 1.X) will take some
time for adapting calling conventions and system startup code.

I also played with calling conventions, with a surprising result:
Changing the calling conventions from JPI to STACK decreases the
code size by nearly 10%! However, without adapting some assembler
routines this code will not run, I just wanted to see the size.
Surprise: With STACK conventions, the size produced by V3.01 is
nearly the same as with V1.X (188K EXE, all checks on, full optimize).
*Not* worse than V1.X! 

Consequences:
The JPI conventions give only some gain at routines with small parameter
sets. As soon as a routine calls another or the size of it is more than
a trivial one, you can examine a push orgy in the called routine
where all parameters are moved to stack. In fairly large systems,
only a small percentage of all routines are small and trivial enough
to get advantage from register passing. In most cases it produces
additional overhead! Whether the execution time will be affected from
that is not sure, but it is most likely that larger code will run slower.
If JPI had choosen the old stack passing convention as default, their
product would be better in general.

Another question concerning benchmarks: Most of them are short
routines with few parameters. Did this JPI imply to choose
register passing? What about relevancy of such benchmarks??

In practice, I believe, register passing will be worthy
only if you manually control it. In general, it should be turned
off for better results.

-- Thomas
Technical Details
Message-ID: <11710@ifi.informatik.uni-stuttgart.de>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!snorkelwacker.mit.edu!ira.uka.de!ifistg!bs3!schoebel
References: <56F0AA44FD1F400E38@EMBL-Heidelberg.DE> <9782@sail.LABS.TEK.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!snorkelwacker.mit.edu!ira.uka.de!ifistg!bs3!schoebel
From: schoebel@bs3.informatik.uni-stuttgart.de (Thomas Schoebel)
Newsgroups: comp.lang.modula2
Subject: Re: TopSpeed 3.0 First Impressions
Message-ID: <11710@ifi.informatik.uni-stuttgart.de>
Date: 25 Jun 91 10:52:26 GMT
References: <56F0AA44FD1F400E38@EMBL-Heidelberg.DE> <9782@sail.LABS.TEK.COM>
Sender: news@ifistg.uucp
Organization: Informatik, Uni Stuttgart, W. Germany
Lines: 48