🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2674

TopSpeed and assembler

#2674
From: Marco van de Voort
Date: Tue, 01 Aug 1995 22:49
33 lines
1875 bytes
Hallo granville!

Friday June 30 1995 22:22, granville wrote to All:

 g>  The correct way to state this is you can commonly produce code that runs
 g> faster than typical assembler. In code completion / bug rates there is
 g> no comparison at all.....!
 g> In any reasonably complex system, the algorithm is more important than
 g> the code detail, and that is where HLL's have it all over assembler. I
 g> have seen systems get a 4x speed boost when coded in Modula-2, because
 g> the programmer could
 g>  a) work closer to the problem
 g>  b) code, measure and optimise multiple approaches quickly

I have seen the opposite far more often. When programming in assembler, you
have to understand what you are doing, if you don't, you lock up your system.

I don't plea for pure assembler, but a lot of things can be done better in assembler.

Some things can't be done easily in Modula-2 (or TurboPascal or Basic)

An example : try mirroring a BITSET of an arbritary size.

        11001 becomes 10011.
       110101 becomes 101011. etc.

I REALLY like to see a modula routine for this (the length of the bitset is a parameter of the procedure, CARDINAL) that uses shifting. Other concepts( with
a for loop) are less optimal in both assembler and modula2, (except when
compiling 386+, then the FOR algoritm might be more favourable, because the IN and INCL/EXCL command are only one instruction large).

My assembly routine is, parameter handling inclusive, 72 bytes.

Marco  (M.W.T.J.v.d.Voort@stud.tue.nl or MarcoV@stack.urc.tue.nl)
Technical Details
Message-ID: <807534257.AA00868@puddle.fidonet.org>
Path: arc1-ca.pugleaf.net!news.sprintlink.net!psgrain!puddle!internet

Show Full Headers
Complete Article Headers
From: Marco.van.de.Voort@p18.f402.n284.z2.fidonet.org (Marco van de Voort)
Path: arc1-ca.pugleaf.net!news.sprintlink.net!psgrain!puddle!internet
Newsgroups: comp.lang.modula2
Subject: TopSpeed and assembler
Message-ID: <807534257.AA00868@puddle.fidonet.org>
Date: Tue, 01 Aug 1995 14:49:02 -0800
X-FTN-To: granville