Search found 318 matches

by Provoni
Oct 17, 2018 18:39
Forum: General
Topic: Fast random integers
Replies: 49
Views: 2244

Re: Fast random integers

Thank you deltarho[1857], it works now.

I would also like to test PCG32II but have no clue how to use it. Could you give a small example please? And possibly also a small example of how you determine the Mhz of a RNG?
by Provoni
Oct 17, 2018 6:02
Forum: General
Topic: Fast random integers
Replies: 49
Views: 2244

Re: Fast random integers

Suppose that you have a stream of random numbers (0,1,1,1,0,1,0,0,..). If the numbers are really random then the next number in the stream can be predicted with no more or less than 50% accuracy on average. So with that idea in mind I wrote a really fancy predictor that learns over time on a stream...
by Provoni
Oct 17, 2018 6:00
Forum: General
Topic: Fast random integers
Replies: 49
Views: 2244

Re: Fast random integers

Trying to use CryptoRndll but it throws 2 errors while compiling: CryptoRndBufferCNG.inc(171) error 20: Type mismatch, before ')' in 'SwitchBufferCriteria = Cast(Long, ptrBuffer) + BufferSize' CryptoRndBufferCNG.inc(196) error 20: Type mismatch, before ')' in 'SwitchBufferCriteria = Cast(Long, ptrBu...
by Provoni
Oct 16, 2018 19:37
Forum: General
Topic: Fast random integers
Replies: 49
Views: 2244

Re: Fast random integers

My method: Say the program needs random integers between 0 and 25. 1. Pre-generate a large array (array 1) of random integers between 0 and 25. 2. Pre-generate another array (array 2) with 26 elements that has the integers from 0 to 25 placed randomly. 3. To get a random integer increment the positi...
by Provoni
Oct 16, 2018 7:23
Forum: General
Topic: The possible fallacy of faster PRNGs
Replies: 11
Views: 440

Re: The possible fallacy of faster PRNGs

My thoughts then. It's like the CPU core discussion for gaming, where people correctly argue that most don't need more than 4 cores for gaming, still people like the thought of having more than 4 CPU cores. Others really need more than 4 cores for stuff. It's about what you need for what you are doi...
by Provoni
Oct 16, 2018 7:08
Forum: General
Topic: The possible fallacy of faster PRNGs
Replies: 11
Views: 440

Re: The possible fallacy of faster PRNGs

IMHO it is not a mistake to ask for the bare loop speed. It was, I think that Infinity is not a random number generator. But somewhere I saw a post where Infinity was listed and was followed by something along the lines of "Courtesy of ... labs" and got confused. So Infinity is the bare l...
by Provoni
Oct 16, 2018 7:04
Forum: General
Topic: The possible fallacy of faster PRNGs
Replies: 11
Views: 440

Re: The possible fallacy of faster PRNGs

Yes, I understood the point of your post. However, what the above does show is that looking for a faster generator for some applications will be a waste of time. That is common sense and faster PRNG is used by people who need faster PRNG. Is Infinity a random number generator or what you call the sa...
by Provoni
Oct 16, 2018 5:24
Forum: General
Topic: The possible fallacy of faster PRNGs
Replies: 11
Views: 440

Re: The possible fallacy of faster PRNGs

What is the Infinity concept?
by Provoni
Oct 15, 2018 18:59
Forum: General
Topic: Fast random integers
Replies: 49
Views: 2244

Re: Fast random integers

Suppose you select a random number from the range 0 to 10 Do this 20000000 and keep the counts in an array(0 to 10) array(0), array(1) ... should all be the same. Of course they are not in practice. Here are some observations about the array() from randomize 1 to randomize 4 (randomize 5 is too slo...
by Provoni
Oct 15, 2018 6:25
Forum: General
Topic: Fast random integers
Replies: 49
Views: 2244

Re: Fast random integers

Suppose that you have a stream of random numbers (0,1,1,1,0,1,0,0,..). If the numbers are really random then the next number in the stream can be predicted with no more or less than 50% accuracy on average. So with that idea in mind I wrote a really fancy predictor that learns over time on a stream ...
by Provoni
Oct 13, 2018 11:21
Forum: General
Topic: Fast random integers
Replies: 49
Views: 2244

Fast random integers

Original method by me. Try this when you need a very fast random integer generator. Quite customizable too. Updated 'Provoni's FRI (Fast Random Integers) 10172018 '--------------------------------------------- '- Fast and unpredictable random integer generator '- Preferably without the overhead of t...
by Provoni
Oct 13, 2018 8:27
Forum: General
Topic: The possible fallacy of faster PRNGs
Replies: 11
Views: 440

Re: The possible fallacy of faster PRNGs

@deltarho[1859],

I see your point. Can you include the bare loop speed with this table?

Code: Select all

Num Recipes  1309.51
PCG32II      1383.29
Knuth64      1384.69
Infinity     1385.15
Loop         ????.??
by Provoni
Oct 12, 2018 5:14
Forum: General
Topic: GCC FDO
Replies: 5
Views: 393

Re: GCC FDO

fxm wrote:? :
-Wc -fprofile-generate
see Compiler Option: -Wc

Yes, -Wc -fprofile-generate.
by Provoni
Oct 11, 2018 16:45
Forum: General
Topic: GCC FDO
Replies: 5
Views: 393

Re: GCC FDO

MrSwiss wrote:Do you have the profiler (gprof) installed?

Not sure what you mean with installed but gprof.exe is in the win64 bin directory.
by Provoni
Oct 11, 2018 13:10
Forum: General
Topic: GCC FDO
Replies: 5
Views: 393

GCC FDO

How does one get the feedback-directed optimization (FDO) flags to work with FreeBASIC programs? The flags are: -fprofile-generate -fprofile-use The flag -fprofile-generate should be used first but it throws a bunch of errors: Program2.o:fake:(.text+0x15): undefined reference to `__gcov_indirect_cal...

Go to advanced search