changeset 199:ca90e70f3831

Blackhole: switch to MMIX (Knuth) generator, which provides 2^64 significant bits. This change passes the one-shot and pipelining tests, and spares us from computing the long mask.
author shade
date Wed, 09 Oct 2013 15:34:06 +0400
parents 16583c0781de
children 912eff52db80
files jmh-core/src/main/java/org/openjdk/jmh/logic/BlackHole.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/logic/BlackHole.java	Wed Oct 09 15:19:30 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/logic/BlackHole.java	Wed Oct 09 15:34:06 2013 +0400
@@ -210,7 +210,7 @@
         long tlr = this.tlr;
         long tlrMask = this.tlrMask;
 
-        this.tlr = (tlr * 0x5DEECE66DL + 0xBL) & (0xFFFFFFFFFFFFL);
+        this.tlr = (tlr * 6364136223846793005L + 1442695040888963407L);
         if ((tlr & tlrMask) == 0) {
             // SHOULD ALMOST NEVER HAPPEN IN MEASUREMENT
             this.tlrMask = (tlrMask << 1) + 1;
@@ -228,7 +228,7 @@
         long tlr = this.tlr;
         long tlrMask = this.tlrMask;
 
-        this.tlr = (tlr * 0x5DEECE66DL + 0xBL) & (0xFFFFFFFFFFFFL);
+        this.tlr = (tlr * 6364136223846793005L + 1442695040888963407L);
         if ((tlr & tlrMask) == 0) {
             // SHOULD ALMOST NEVER HAPPEN IN MEASUREMENT
             this.tlrMask = (tlrMask << 1) + 1;