Re: the inefficiency of noncontiguous data - why?



I'm pretty sure there is no big difference in memory consumption.

The array itself takes up 16 bytes; that's 8 for the object, 4 for the
size, and 4 for alignment.
So your overhead is 16 bytes.
Add to that what the VM needs for memory allocation, which is also
insignificant compared to 64 MB.


.



Relevant Pages

  • Re: Poor array performance
    ... Now if I watch the memory consumption when running (1000 iterations to ... So it's clear that NO arrays are created, ... which is 999^2 or the largest value calculated in the loop. ... So, this is what I call "broken optimization", the results are wrong, so ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Logical values
    ... to keep the memory consumption to minimum and thought that store this ... Then I discover that it appears that a logic array ... I would suggest that you store the data ... subsasgn operators to make it transparent that you are operating ...
    (comp.soft-sys.matlab)
  • Re: Memory Problem
    ... being represented by array. ... Before I add a new entry to the table, I check if there is already an entry ... I store keys for all the entries with row-number in a ... What about the memory consumption of the dictionary? ...
    (comp.lang.python)
  • Re: Memory Problem
    ... each column internally being represented by array. ... # the class DBTable has a list, each list entry referencing a DBColu bject ... Of course, the more keys the bigger is the dictionary, but is there a way to ... What about the memory consumption of the ...
    (comp.lang.python)
  • Re: writing code over several lines
    ... > They still have only four bytes (a pointer) per element, ... the memory consumption of all the constructed tuple's elements is ... So, here, the overhead of the structure itself might be important, ... Today we do [twoargsfuncfor x in lotsoffirstargs] ...
    (comp.lang.python)