Search found 313 matches

by Provoni
Sep 28, 2018 17:42
Forum: Windows
Topic: gcc 5.2 vs gcc 8.1
Replies: 64
Views: 4346

Re: gcc 5.2 vs gcc 8.1

Thank you for these tests deltarho[1859].
by Provoni
Aug 15, 2018 19:48
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 429
Views: 62002

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Provoni - simple change makes your rng more random Sub ShowBits32( p as any ptr, Newline As boolean = true) '' use ScreenRes w,h, 32 Dim As ulong I, AryFG(3), AryBG(3) var oldcol = color() AryFG(0) = RGB(200,200,200) AryFG(1) = RGB(255,0,0) AryFG(2) = RGB(0,255,0) AryFG(3) = RGB(0,96,255) AryBG(0) ...
by Provoni
Jul 29, 2018 18:17
Forum: General
Topic: Prime number distribution at sight
Replies: 11
Views: 832

Re: Prime number distribution at sight

A Natural Prime-Generating Recurrence: https://cs.uwaterloo.ca/journals/JIS/VOL11/Rowland/rowland21.pdf function gcd(byval a as longint,byval b as longint)as longint do while b<>0 var t=b b=a mod b a=t loop return a end function screenres 640,480,32 dim as longint p1,p2,i,j p1=7 for i=2 to 10000000 ...
by Provoni
Jul 29, 2018 8:23
Forum: Projects
Topic: Simple WinAPI GUI library
Replies: 58
Views: 12627

Re: Simple WinAPI GUI library

Hey Lothar,

Thank you for the updates.

Is it possible to use/have a spacer line between menu items?
by Provoni
Jul 29, 2018 7:56
Forum: General
Topic: Prime number distribution at sight
Replies: 11
Views: 832

Re: Prime number distribution at sight

Prime numbers are emergent from a rule imposed on the natural numbers. I say that prime numbers come in different orders such that the lower orders are prime to the higher orders: Order 0 prime: 1 (is prime to order 1) Order 1 primes: 2, 3, 5, 7, 11, etc... (are prime to order 2) Order 2 primes: 4, ...
by Provoni
Jul 19, 2018 19:17
Forum: Community Discussion
Topic: Compiled reality
Replies: 20
Views: 1843

Re: Compiled reality

In the opening post replace dim as ulongint i,j with dim as ulongint i dim shared as ulongint j and the loop is no longer optimized out. Compiled with -gen gcc -Wc -O3 Interesting! Is that because it allows scenarios in which the compiler is not able to see/determine if the shared variable is used ...
by Provoni
Jul 18, 2018 14:46
Forum: Community Discussion
Topic: Compiled reality
Replies: 20
Views: 1843

Re: Compiled reality

Removing something because it has no obvious functionality is the most ridiculous type of "optimization" I've ever heard of And it especially attempts to determine the functionality in terms of the user (or the observer in quantum mechanics). But if you add a timer to time the loop it is ...
by Provoni
Jul 15, 2018 15:35
Forum: Community Discussion
Topic: Compiled reality
Replies: 20
Views: 1843

Re: Compiled reality

It is a good article but there are odd dogmatic remarks such as: But I get better performance with -funroll-loops -fomg-optimize! No, people only think they do because someone has convinced them that more flags are better. Aggressive flags will only hurt applications when used system-wide. Even the ...
by Provoni
Jul 15, 2018 9:04
Forum: Community Discussion
Topic: Compiled reality
Replies: 20
Views: 1843

Compiled reality

Hey all, Consider the code down below. When compiling it with GCC -O3 the program finishes instantly. However, when you comment out the "print j", the program runs for a long time. That is because at O3 the compiler decided that the for loop serves no obvious function. Though it still migh...
by Provoni
Jun 17, 2018 8:19
Forum: Tips and Tricks
Topic: lofac
Replies: 4
Views: 811

Re: lofac

Fermat's method (not optimized): screenres 640,480,32 dim as uinteger i,n,s dim as double d n=12349 s=sqr(n) do i+=1 s+=1 d=sqr((s*s)-n) if frac(d)=0 then print "iterations: "+str(i)+", "+str(s-d)+" * "+str(s+d)+" = "+str(n) exit do end if loop beep sleep It c...
by Provoni
Jun 10, 2018 13:57
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 429
Views: 62002

Re: Where can I get a Recent-Git-Build of FreeBASIC?

In 64 bit, with either of the two switches route, I cannot measure the time. I repeated the two statements 100 times in a loop within the 10^7 loop and am getting a time of zero. You have to record the random numbers somehow, like by adding them to a variable that is later on outputted to the user,...
by Provoni
Jun 10, 2018 10:08
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 429
Views: 62002

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Added: "Your implementation is slow." I may be wrong on that - I am getting some weird results in 64 bit. On my Ivy Bridge CPU, using FreeBASIC 1.05 64-bit, and "-gen GCC -O max -Wc -march=native,-funroll-loops,-ffast-math", the implementation: ms_state=(214013*ms_state+2531011)...
by Provoni
Jun 09, 2018 14:39
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 429
Views: 62002

Re: Where can I get a Recent-Git-Build of FreeBASIC?

@deltarho[1859] I really like your emphasis on the importance of speed with FreeBASIC and would like to speed test this new FreeBASIC version with my 64-bit multi-threaded substitution solver. Is there a download link that would work with FbEdit? Also, a part of my program needs a high performance r...
by Provoni
May 25, 2018 17:57
Forum: General
Topic: Lookup table
Replies: 10
Views: 655

Re: Lookup table

Provoni wrote:Any idea how to fix this more efficiently?

I issued it by only checking one up and down when the gap distance is 1.
by Provoni
May 24, 2018 14:29
Forum: General
Topic: Lookup table
Replies: 10
Views: 655

Re: Lookup table

Thanks grindstone and paul doe for your replies. I implemented the lookup table (trie) that roughly isolates sub ranges. The neat thing about it is that the size of the lookup table is variable, and that larger sizes cut down on the average numbers successive approximations allot. For 500,000,000 en...

Go to advanced search