[Oberon] Python vs oberon: requirements to store 1 byte in memory

oberon-eth at email.cz oberon-eth at email.cz
Mon Feb 7 14:27:58 CET 2022

In a programming language python following code: sys.getsizeof('a') outputs 
50 bytes of memory required for one character (!) while in oberon, 
procedures SIZEOF(CHAR) or Strings.Length("1") both give only 1 byte (as 

Note the ratio 50:1.
Imagine you would consume in your programm 1G of memory and it will all of 
sudden turn into 50G!

My question: is the ratio so huge because python is an interpreter language 
and the python function reports some data required for an interpreter to run

or is it just so big because of lack of an efficient python language 

On the other hand, does oberon really report correctly all the data 
associated with CHAR type?
Isn't there any hidden memory being consumed without being reported by this 
oberon function?

Python reports size including overhead caused by garbage collector. 

Is this the same case in oberon? Surely not, so what is the memory size 
required for oberon garbage collector to handle one CHAR?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20220207/5df4cc2a/attachment.html>

More information about the Oberon mailing list