🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #22422

Binary<->Decimal conversion

#22422
From: Richard O'keefe
Date: Tue, 13 Feb 1990 09:02
17 lines
1370 bytes
There was a lot of talk last year about integer multiply/divide and
whether they are important enough to go in RISCs.  One of the things
for which they seem useful is binary<->decimal conversion.
I have experimented with table-based binary<->decimal conversion.
At the moment my files are on a tape, but I mean to post sources for
table-based conversion routines to one of the sources newsgroups soon.

The bottom line is that table-based 32-bit-binary <-> byte decimal
conversion not only performs well on RISCs that lack hardware multiply
and divide, but it beats the UNIX library functions on machines (VAX,
32?32, Clipper) that _have_ got hardware multiply and divide.  For
example, my version of strtoul() runs about 20%-24% faster than the
BSD UNIX library routine on an Encore Multimax or a VAX.

Of course the C functions have overheads (skipping leading white space
and so on) which do not apply to COBOL or PL/I; if data alignment and
size were known in advance the table-based approach would look even better.
Technical Details
Message-ID: <2863@goanna.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!munnari.oz.au!goanna!ok

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!munnari.oz.au!goanna!ok
From: ok@goanna.oz.au (Richard O'keefe)
Newsgroups: comp.arch
Subject: Binary<->Decimal conversion
Keywords: RISC wars
Message-ID: <2863@goanna.oz.au>
Date: 13 Feb 90 09:02:51 GMT
Organization: Comp Sci, RMIT, Melbourne, Australia
Lines: 17