[Oberon] Why is RSC string data word-aligned?
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
> to compress consecutive 0X to only one 0X? Do you really want to
> the string area while writing to (huge) disk, where normally space is no
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
> To optimize the File IO you would turn this [...] into something like
I'm not sure where that sample comes from. It doesn't match the code in
module loader (and it wouldn't make sense; the module loader is doing a
read, not a write).
> As strings are written byte by byte, the possibly different
> 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
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Oberon