[Oberon] Why is RSC string data word-aligned?

Colby Russell oberon at x.colbyrussell.com
Sun Jan 31 02:39:28 CET 2021


On 1/30/21 6:50 PM, Joerg wrote:
 > Now, do I understand you correctly that while writing the rsc file 
you want
 > to compress consecutive 0X to only one 0X? Do you really want to 
compress
 > the string area while writing to (huge) disk, where normally space is no
 > issue?

No.  To repeat: I'm talking about CPU instructions and memory reads--i.e.
trying to measure this "optimization" on the terms that were presumably a
concern at the time the strategy was chosen--not an attempt to optimize for
disk space.

 > To optimize the File IO you would turn this [...] into something like 
this

I'm not sure where that sample comes from.  It doesn't match the code in 
the
module loader (and it wouldn't make sense; the module loader is doing a 
file
read, not a write).

 > As strings are written byte by byte, the possibly different 
endianesses of
 > the reading and writing systems do not matter.

Right, this reinforces what I'm referring to.  When dealing with strings,
operations are going to occur on a character-by-character, anyway, due to
external constraints involving the nature of strings--as in the section 
of the
module loader that I linked to, and as you're describing now.  So again: in
concrete terms, where does the efficiency for word alignment come in?  In
trying to reason about the strategy, I've _only_ found downsides so far.

-- 
Colby Russell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20210130/cbb0d7bb/attachment.html>


More information about the Oberon mailing list