Advertisement
Guest User

Untitled

a guest
May 23rd, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. @Benchmark
  2. public void unsafeFillOffheapBytes() {
  3. for (int i = 0; i < length; i++) {
  4. UNSAFE.putByte(address + i, b);
  5. }
  6. }
  7. @Benchmark
  8. public void unsafeFillOnHeapBytes() {
  9. for (int i = 0; i < arrayB.length; i++) {
  10. UNSAFE.putByte(arrayB, B_ARRAY_OFFSET + i, b);
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement