<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: A Java Programmer&#8217;s Guide to Random Numbers, Part 1: Beyond java.util.Random</title>
	<atom:link href="http://blog.uncommons.org/2008/04/03/a-java-programmers-guide-to-random-numbers-part-1-beyond-javautilrandom/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.uncommons.org/2008/04/03/a-java-programmers-guide-to-random-numbers-part-1-beyond-javautilrandom/</link>
	<description>Rants and opinion interspersed with awe-inspiring tales of heoric software engineering endeavours.</description>
	<pubDate>Wed, 19 Nov 2008 14:17:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: New Adventures in Software &#187; Optimising Computer Programs for Performance</title>
		<link>http://blog.uncommons.org/2008/04/03/a-java-programmers-guide-to-random-numbers-part-1-beyond-javautilrandom/#comment-2014</link>
		<dc:creator>New Adventures in Software &#187; Optimising Computer Programs for Performance</dc:creator>
		<pubDate>Wed, 23 Jul 2008 01:18:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uncommons.org/?p=61#comment-2014</guid>
		<description>[...] each time it runs.  Basically, it does the same thing around a billion times with different random inputs for each iteration.  I calculated that, for my first working version of the program, it would take [...]</description>
		<content:encoded><![CDATA[<p>[...] each time it runs.  Basically, it does the same thing around a billion times with different random inputs for each iteration.  I calculated that, for my first working version of the program, it would take [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swapnoni Mukherjee</title>
		<link>http://blog.uncommons.org/2008/04/03/a-java-programmers-guide-to-random-numbers-part-1-beyond-javautilrandom/#comment-1485</link>
		<dc:creator>Swapnoni Mukherjee</dc:creator>
		<pubDate>Tue, 20 May 2008 17:55:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uncommons.org/?p=61#comment-1485</guid>
		<description>Well I see your point.

Keep up the good work.</description>
		<content:encoded><![CDATA[<p>Well I see your point.</p>
<p>Keep up the good work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://blog.uncommons.org/2008/04/03/a-java-programmers-guide-to-random-numbers-part-1-beyond-javautilrandom/#comment-1475</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 19 May 2008 19:41:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uncommons.org/?p=61#comment-1475</guid>
		<description>Swapnonil, it's all relative.  Your code is only generating 256 bytes of random data (that's only 64 32-bit integers).  Any RNG is going to be fast enough for that (unless this routine is in some critical loop).

Some applications need to generate millions of random numbers as quickly as possible.  When you benchmark SecureRandom in this context it is many times slower than the alternatives.

The RNGs in Uncommons Maths were originally written for use in evolutionary computation.  When I was running evolutionary simulations for my masters degree (without these RNGs), a single experiment would take about 12 hours to complete, and the time spent generating random values was a significant chunk of this.</description>
		<content:encoded><![CDATA[<p>Swapnonil, it&#8217;s all relative.  Your code is only generating 256 bytes of random data (that&#8217;s only 64 32-bit integers).  Any RNG is going to be fast enough for that (unless this routine is in some critical loop).</p>
<p>Some applications need to generate millions of random numbers as quickly as possible.  When you benchmark SecureRandom in this context it is many times slower than the alternatives.</p>
<p>The RNGs in Uncommons Maths were originally written for use in evolutionary computation.  When I was running evolutionary simulations for my masters degree (without these RNGs), a single experiment would take about 12 hours to complete, and the time spent generating random values was a significant chunk of this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swapnonil Mukherjee</title>
		<link>http://blog.uncommons.org/2008/04/03/a-java-programmers-guide-to-random-numbers-part-1-beyond-javautilrandom/#comment-1473</link>
		<dc:creator>Swapnonil Mukherjee</dc:creator>
		<pubDate>Mon, 19 May 2008 09:21:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uncommons.org/?p=61#comment-1473</guid>
		<description>Hi Dan,

The following code took 60 ms to execute on my Pentium 4, 3.0 GHZ 5 year old PC.

		long t1 = System.currentTimeMillis();
		byte[] holder  = new byte[1024/8];
		SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG");
		secureRandom.nextBytes(holder);
		System.out.println("new BASE64Encoder().encode(holder) = " + new BASE64Encoder().encode(holder));
		long t2 = System.currentTimeMillis();
		System.out.println(t2-t1);

Which makes me wonder why you call SecureRandom slow?</description>
		<content:encoded><![CDATA[<p>Hi Dan,</p>
<p>The following code took 60 ms to execute on my Pentium 4, 3.0 GHZ 5 year old PC.</p>
<p>		long t1 = System.currentTimeMillis();<br />
		byte[] holder  = new byte[1024/8];<br />
		SecureRandom secureRandom = SecureRandom.getInstance(&#8221;SHA1PRNG&#8221;);<br />
		secureRandom.nextBytes(holder);<br />
		System.out.println(&#8221;new BASE64Encoder().encode(holder) = &#8221; + new BASE64Encoder().encode(holder));<br />
		long t2 = System.currentTimeMillis();<br />
		System.out.println(t2-t1);</p>
<p>Which makes me wonder why you call SecureRandom slow?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: New Adventures in Software &#187; A Java Programmer&#8217;s Guide to Random Numbers, Part 3: Seeding</title>
		<link>http://blog.uncommons.org/2008/04/03/a-java-programmers-guide-to-random-numbers-part-1-beyond-javautilrandom/#comment-1249</link>
		<dc:creator>New Adventures in Software &#187; A Java Programmer&#8217;s Guide to Random Numbers, Part 3: Seeding</dc:creator>
		<pubDate>Thu, 10 Apr 2008 21:42:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uncommons.org/?p=61#comment-1249</guid>
		<description>[...] A Java Programmer&#8217;s Guide to Random Numbers, Part 1: Beyond java.util.Random  [...]</description>
		<content:encoded><![CDATA[<p>[...] A Java Programmer&#8217;s Guide to Random Numbers, Part 1: Beyond java.util.Random  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: IppatsuBlog &#187; Oltre java.util.Random</title>
		<link>http://blog.uncommons.org/2008/04/03/a-java-programmers-guide-to-random-numbers-part-1-beyond-javautilrandom/#comment-1227</link>
		<dc:creator>IppatsuBlog &#187; Oltre java.util.Random</dc:creator>
		<pubDate>Mon, 07 Apr 2008 12:08:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uncommons.org/?p=61#comment-1227</guid>
		<description>[...] A Java Programmer’s Guide to Random Numbers, Part 1: Beyond java.util.Random [...]</description>
		<content:encoded><![CDATA[<p>[...] A Java Programmer’s Guide to Random Numbers, Part 1: Beyond java.util.Random [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: New Adventures in Software &#187; A Java Programmer&#8217;s Guide to Random Numbers, Part 2: Not just coins and dice</title>
		<link>http://blog.uncommons.org/2008/04/03/a-java-programmers-guide-to-random-numbers-part-1-beyond-javautilrandom/#comment-1209</link>
		<dc:creator>New Adventures in Software &#187; A Java Programmer&#8217;s Guide to Random Numbers, Part 2: Not just coins and dice</dc:creator>
		<pubDate>Sun, 06 Apr 2008 00:03:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uncommons.org/?p=61#comment-1209</guid>
		<description>[...] A Java Programmer&#8217;s Guide to Random Numbers, Part 1: Beyond java.util.Random  [...]</description>
		<content:encoded><![CDATA[<p>[...] A Java Programmer&#8217;s Guide to Random Numbers, Part 1: Beyond java.util.Random  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jos Hirth</title>
		<link>http://blog.uncommons.org/2008/04/03/a-java-programmers-guide-to-random-numbers-part-1-beyond-javautilrandom/#comment-1197</link>
		<dc:creator>Jos Hirth</dc:creator>
		<pubDate>Fri, 04 Apr 2008 07:32:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uncommons.org/?p=61#comment-1197</guid>
		<description>I really like the Mersenne Twister (Kenta Cho used it in his games for example), but most implementations seem to use some really awkward license. Apache is a good one though.

CellularAutomatonRNG sounds intriguing. I'll have to take a closer look.

I wrote a lengthy article about randomness in games (shuffling in particular). Eventually it's of some use for the follow up article.
 
http://kaioa.com/node/53</description>
		<content:encoded><![CDATA[<p>I really like the Mersenne Twister (Kenta Cho used it in his games for example), but most implementations seem to use some really awkward license. Apache is a good one though.</p>
<p>CellularAutomatonRNG sounds intriguing. I&#8217;ll have to take a closer look.</p>
<p>I wrote a lengthy article about randomness in games (shuffling in particular). Eventually it&#8217;s of some use for the follow up article.</p>
<p><a href="http://kaioa.com/node/53" rel="nofollow">http://kaioa.com/node/53</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.217 seconds -->
