[ 
https://issues.apache.org/jira/browse/MAHOUT-753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069420#comment-13069420
 ] 

Lance Norskog commented on MAHOUT-753:
--------------------------------------

Here are some benchmarks of 3 random generators: the JDK one, the 
MurmurHashRandom.java on this patch, and the Mersenne Twister used by Mahout. 
The first table is the standard deviations for 1000 samples, the second is the 
standard deviations for 10 million samples, and the third is the time for 10 
million in milliseconds. (The times are all 0 for 1000 samples.) All three work 
by generating one 32-bit int per random cycle, and the same code turns those 
ints into the various returned types.

h5. Standard Deviations for 1000 samples

|| |JDK|MurmurHash|MersenneTwister||
|Double|0.289|0.579|0.291|
|Gaussian|1.016|0.988|0.996|
|Float|0.286|0.582|0.290|
|Integer|1.241e9|1.225e9|1.227e9|
|Integer(100)|28.491|29.320|29.036|
|Long|5.320e18|5.298e18|5.299e18|
|Boolean|0.5|0.435|0.499|

h5. Standard deviations for 10 million samples

|| |JDK|MurmurHash|MersenneTwister||
|Double|0.288|0.577|0.288|
|Gaussian|1.000|1.000|0.999|
|Float|0.288|0.576|0.288|
|Integer|1.239e9|1.241e9|1.239e9|
|Integer(100)|28.869|28.933|28.875|
|Long|5.324e18|5.318e18|5.324e18|
|Boolean|0.500|0.432|0.500|

h5. Execution time for 10 million samples, in milliseconds

|| |JDK|MurmurHash|MersenneTwister||
|Double|905|937|1826|
|Gaussian|2543|6257|3777|
|Float|515|469|937|
|Integer|468|501|192|
|Integer(100)|592|1155|1033|
|Long|920|923|1795|
|Boolean|530|547|1001|




> MurmurHashRandom class: subclass of java.util.Random that uses MurmurHash
> -------------------------------------------------------------------------
>
>                 Key: MAHOUT-753
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-753
>             Project: Mahout
>          Issue Type: New Feature
>          Components: Math
>            Reporter: Lance Norskog
>            Assignee: Sean Owen
>            Priority: Minor
>         Attachments: MurmurBench.java, MurmurHashRandom.java
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to