Search found 1951 matches

by deltarho[1859]
Mar 07, 2017 13:13
Forum: Windows
Topic: Mersenne Twister: A new twist.
Replies: 22
Views: 2750

Re: Mersenne Twister: A new twist.

I have found some public domain Mersenne Twister assembler and am using an assembler version of genrand_int32(). Flat out RndMT is now coming in at 70.5MHz. This is still a little slower than FreeBASIC's 85.7MHz but in real world applications I reckon that the difference would not manifest itself no...
by deltarho[1859]
Mar 06, 2017 17:09
Forum: Windows
Topic: Mersenne Twister: A new twist.
Replies: 22
Views: 2750

Re: Mersenne Twister: A new twist.

I have just removed

Code: Select all

mti = N ' Signal state vector has been newly populated

in the RndMT.bas entry point.

It had already been signalled.

We need to do it at the end of RandomizeRndMT because we are newly populating the state vector behind the Twister's back. <smile>
by deltarho[1859]
Mar 06, 2017 16:16
Forum: Windows
Topic: Mersenne Twister: A new twist.
Replies: 22
Views: 2750

Re: Mersenne Twister: A new twist.

I have just removed

Code: Select all

#include once "win/wincrypt.bi"
#inclib "crypt32"

It was needed in the general purpose hash function I was using - not needed in SHA512().
by deltarho[1859]
Mar 06, 2017 15:03
Forum: Windows
Topic: Mersenne Twister: A new twist.
Replies: 22
Views: 2750

Mersenne Twister: A new twist.

In the the thread ' On FreeBASIC's random number generators ' just using a single 32 bit seed for the Mersenne Twister pseudo random number generator was questioned and it was felt that a better method of seeding would be welcome. With a single 32 bit seed we are restricted to only 2^32 entry points...
by deltarho[1859]
Mar 03, 2017 14:48
Forum: Windows
Topic: A fast CPRNG
Replies: 67
Views: 7519

Re: A fast CPRNG

Deleted
by deltarho[1859]
Mar 02, 2017 13:39
Forum: Windows
Topic: A fast CPRNG
Replies: 67
Views: 7519

Re: A fast CPRNG

Found a bug in RdRand FillBuffer(). Speed has reduced further. I was storing eax + 0 instead of rax. I was moving through the buffer 8 bits at a time instead of 4 - got that right. <smile>. There is now so much conditional assembly going on in RdRand's FillBuffer it is getting close to having two ve...
by deltarho[1859]
Mar 02, 2017 11:25
Forum: Windows
Topic: A fast CPRNG
Replies: 67
Views: 7519

Re: A fast CPRNG

Timings. Flat out Real world 32 bit 64 bit 64 bit* 32 bit 64 bit 64 bit* Algo 1 219 160 307 100 73 119 BCryptGenRandom Algo 2 36 57 57 20 32 32 Intel RdRand Flat out Real World [1] 32 bit 64 bit 64 bit [2] 32 bit 64 bit 64 bit [2] 1: 71 MHz 1: 66 MHz 1: 68 MHz 1: 31 MHz 1: 33 MHz 1: 35 MHz 2: 105 MH...
by deltarho[1859]
Mar 02, 2017 0:42
Forum: Tips and Tricks
Topic: On FreeBASIC's random number generators.
Replies: 35
Views: 4141

Re: On FreeBASIC's random number generators.

@Provoni

New version published - you'll find it in the same place - no stinkin' assembler error messages now.

It works fine in 64 bit mode without any additional compiler options but you may like to try -gen gcc -Wc -O1 without defining ALGO.

Have fun.
by deltarho[1859]
Mar 02, 2017 0:32
Forum: Windows
Topic: A fast CPRNG
Replies: 67
Views: 7519

Re: A fast CPRNG

64 bit is now back on the table. It was a simple correction but not easily found and it had been found before. 'Been there a few times. <smile> Stuff like 'mov [ebx + esi], eax' needed editing to 'mov dword ptr [ebx + esi], eax'. That was needed 11 times in just over 300 lines of code. New version o...
by deltarho[1859]
Mar 01, 2017 23:56
Forum: Beginners
Topic: Failed compilation but no errors and no warnings
Replies: 23
Views: 1697

Re: Failed compilation but no errors and no warnings

Is that too much to ask?

Doesn't look like it.

I have just removed a 'dword ptr' to force a failure and FBide presented me with the error details I was getting from the command line compilation.

It took a while to get everything to show as smaller text size.

Is there a recent keyword list?
by deltarho[1859]
Mar 01, 2017 22:19
Forum: Beginners
Topic: Failed compilation but no errors and no warnings
Replies: 23
Views: 1697

Re: Failed compilation but no errors and no warnings

The annoying thing is the IDE is in a position to know that nothing has been dumped to file so should knock out a message box along either of these lines. 1) The compilation has failed. I have absolutely no idea why and will hot insult you by telling you that I cannot find the exe. Good luck on that...
by deltarho[1859]
Mar 01, 2017 18:23
Forum: Tips and Tricks
Topic: On FreeBASIC's random number generators.
Replies: 35
Views: 4141

Re: On FreeBASIC's random number generators.

While compiling this message popped up when using your code. Tell me about it.<smile> I started a thread about that yesterday. It looks like it has manifested itself dependent upon Windows versions and FreeBASIC versions. I have been getting some very strange behaviour. My logic took a battering an...
by deltarho[1859]
Mar 01, 2017 15:31
Forum: Beginners
Topic: Failed compilation but no errors and no warnings
Replies: 23
Views: 1697

Re: Failed compilation but no errors and no warnings

Interesting. So, Billythebarge did not need 'dword ptr' with Windows Vista and FREEBASIC-1.03.0-win64 but I did with Windows 10 and FREEBASIC-1.05.0-win64. Ain't programming fun? A: Got an update for you. B: Oh, good - security and bug fixes? A: No - new features. B: You are now looking down the bar...
by deltarho[1859]
Mar 01, 2017 15:01
Forum: Beginners
Topic: Failed compilation but no errors and no warnings
Replies: 23
Views: 1697

Re: Failed compilation but no errors and no warnings

EUREKA! GAS needs a helping hand. Put a bit of flesh on the failing code above to give it something to do. This works for 32 bit and 64 bit. Function Test64 As ULong Dim As any Ptr ptrBuffer Dim As ULong testvar testvar = 123456 ptrBuffer = @testvar Asm mov eax, dword ptr [ptrBuffer] mov eax, [eax] ...
by deltarho[1859]
Mar 01, 2017 14:04
Forum: Beginners
Topic: Failed compilation but no errors and no warnings
Replies: 23
Views: 1697

Re: Failed compilation but no errors and no warnings

@srvaldez seem like I am on your ignore list I was about to reply earlier but I was up to my neck in commenting out code hoping to see a compilation at some point but it never happened. I ended up with just a few lines which still did not compile; as posted above. I did try your original suggestion ...

Go to advanced search