diff --git a/src/main/java/org/agrona/concurrent/UnsafeBuffer.java b/src/main/java/org/agrona/concurrent/UnsafeBuffer.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/agrona/concurrent/UnsafeBuffer.java
+++ b/src/main/java/org/agrona/concurrent/UnsafeBuffer.java
@@ -277,7 +277,18 @@ public class UnsafeBuffer implements AtomicBuffer
             boundsCheck0(index, length);
         }
 
-        UNSAFE.setMemory(byteArray, addressOffset + index, length, value);
+        final long offsetIndex = addressOffset + index;
+        if (0 == (offsetIndex & 1) && length > 64)
+        {
+            // This horrible filth is to encourage the JVM to call memset() when address is even.
+            // TODO: check if this still applies when Java 9 is out!!!
+            UNSAFE.putByte(byteArray, offsetIndex, value);
+            UNSAFE.setMemory(byteArray, offsetIndex + 1, length - 1, value);
+        }
+        else
+        {
+            UNSAFE.setMemory(byteArray, offsetIndex, length, value);
+        }
     }
 
     public int capacity()
[Java] Change UnsafeBuffer.setMemory to offset by 1 to get around a JVM issue  to encourage it to call memset() as the method is not instrinsified.