package org.jenetics.util;

import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;

import org.testng.annotations.Test;

public class XORShiftRandomTest {


	@Test
	public void nextDouble() {
		final Random jrand = new Random(); //ThreadLocalRandom.current();
		final Random xorrand = new XORShiftRandom(); //.INSTANCE.get();

		final int loops = 100000000;

		long start = System.currentTimeMillis();
		for (int i = 0; i < loops; ++i) {
			jrand.nextDouble();
		}
		long stop = System.currentTimeMillis();
		System.out.println("JRand: " + (stop - start) + "ms");

		start = System.currentTimeMillis();
		for (int i = 0; i < loops; ++i) {
			xorrand.nextDouble();
		}
		stop = System.currentTimeMillis();
		System.out.println("XORRand: " + (stop - start) + "ms");

	}

}

@@ -229,24 +229,8 @@
 d = 
-new Random(); //
 Thre
@@ -763,10 +763,103 @@
 );%0A%0A%09%7D%0A%0A
+%09public static void main(final String%5B%5D args) %7B%0A%09%09new XORShiftRandomTest().nextDouble();%0A%09%7D%0A%0A
 %7D%0A

Add XORShiftRandomTest class.