Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1032635 // collectionBytesPerEntry

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (4570L/27K).

static <A> double collectionBytesPerEntry(Cl<A> l) {
  O[] a = toObjectArray_nonConcurrent(l);
  long arraySize = unsafe_sizeOf(a);
  long payloadSize = guessObjectSize(a)-arraySize;
  
  ret doubleRatio(guessObjectSize(l)-payloadSize, l(a));
}

Author comment

Began life as a copy of #1032624

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1032635
Snippet name: collectionBytesPerEntry
Eternal ID of this version: #1032635/2
Text MD5: 9f8fa956f6c7aeb482433217aaa22b5b
Transpilation MD5: 4ee18cd7182ad565385d2623b473a5d6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-29 22:44:52
Source code size: 250 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 129 / 186
Version history: 1 change(s)
Referenced in: [show references]