[talk] Python

Edward Capriolo edlinuxguru at gmail.com
Thu Apr 28 10:47:04 EDT 2016


Using
https://github.com/twitter/commons/blob/master/src/java/com/twitter/common/objectsize/ObjectSizeCalculator.java

  public static void main (String [] args){
    List<Integer> i = new ArrayList<Integer>();
    System.out.println( ObjectSizeCalculator.getObjectSize(i));
    for (int j = 0 ; j< 100; j++){
      i.add(j);
    }
    System.out.println( ObjectSizeCalculator.getObjectSize(i))
  }
}

Results in,
40
2080

On Thu, Apr 28, 2016 at 10:34 AM, Sujit K M <kmsujit at gmail.com> wrote:

> On Thu, Apr 28, 2016 at 7:53 PM, Edward Capriolo <edlinuxguru at gmail.com>
> wrote:
> > Could you please clarify further? I mean does it involve a object size
> >>> >>> on the JVM.
> >
> > You can count the size of objects in memory. Check the first link:
>
> It is an overhead to performance, we are looking at production systems.
>
> I want an exact reply to each of these question. In terms of the exact
> object ratio.
> For example, an array list what is the object size at run time.
>
> >> >>> Could you please clarify further? I mean does it involve a object
> size
> >> >>> on the JVM.
> >> >>> How to measure the size occupied by the Object? How much extra space
> >> >>> the
> >> >>> JVM
> >> >>> needs? What is JDK Feature that Let's you claim this?
> >> >>>
> >> >>> I have serious questions regarding this claim. As Interpreted or JIT
> >> >>> compiled languages
> >> >>> should in reality occupy more space.
>
> _______________________________________________
> talk mailing list
> talk at lists.nycbug.org
> http://lists.nycbug.org/mailman/listinfo/talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nycbug.org/pipermail/talk/attachments/20160428/dfa24254/attachment.html>


More information about the talk mailing list