Fixnum array memory consumption in Ruby 1.9.3 - are arrays getting compressed? -
I created a new array and use the "use code" .
Fixnum (size: memory used in bytes):
100,000: 900 1,000,000: 1320 10,000,000: 17,552,240
Bagnum (Size: Memory consumption is possible for bitmate, although the consumption of fissom is very weird. I hope at least 4 bytes per element (more likely by 8 bytes because I am using a 64 bit machine) Expect to take in the array. Only logical explanation can come up for low memory consumption I have noticed that the Fixation arrays are being compressed as a bitmap, although I can not find the document that will support it.
What's going on?
Usage Code is:
gc :: profiler. Enabled gc. Start gc :: profiler. Support A = [] 1_000_000.times one & lt; & lt; rand (2 ** 62 ) End: GC :: Profiler.Reports
Result:
Call the index time (seconds) Size size (bytes) Total size (Byte) Total commodity GC time (ms) 1 13.541 15700560 19223000 480575 68.00500000000120337518 2 14.017 15701880 19239360 480984 48.00299999999957378805
Comments
Post a Comment