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

oberon-eth at email.cz oberon-eth at email.cz
Tue Feb 8 20:33:39 CET 2022


Are you sure? When you have one long string than certainly you are right.

But what if you allocate one hundred of strings of length say 10 bytes?

total consumed size: 100 x 60 ???

(python does not have CHAR, I know)


Zdenek



---------- Původní e-mail ----------
Od: Hellwig Geisse <hellwig.geisse at mni.thm.de>
Komu: ETH Oberon and related systems <oberon at lists.inf.ethz.ch>
Datum: 7. 2. 2022 16:05:38
Předmět: Re: [Oberon] Python vs oberon: requirements to store 1 byte in 
memory 
"On Mo, 2022-02-07 at 14:37 +0000, Paul Reed wrote: 
> > So I was a bit disappointed when I did 
> 
> > > > 
> > > > import sys 
> > > > sys.getsizeof('ab') 
> and got 51. :( 
> 

OTOH, the overhead seems to be a constant 49 bytes, 
so the ratio gets better with longer strings, and 
approaches 1 in Zdenek's 1GB example... ;-) 

Regards, 
Hellwig 
-- 
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems 
https://lists.inf.ethz.ch/mailman/listinfo/oberon 
"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20220208/1ea8f617/attachment.html>


More information about the Oberon mailing list