Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Announcing QB64 Phoenix Edition v0.8.0 Release!
#11
If you guys want to see the slowdown in compile times, compile QB64.bas itself. It's a large enough file that it takes 10+minutes or so to compile -- which is why those flags aren't set by default. People who want the option can easily toggle it on, but new users shouldn't have such long waits for compilation times, if they decide to build QB64 itself. Wink
Reply
#12
I have an idea to facilitate the access to the optimizations without changing the original settings of qb64. for example under the menu :

run / start

insert another menu and sub-menu :

run / start optimised
compiled in O2
compiled in O3
compiled in Ofast

the ideal would be to specify a section in the config.ini file so that it is directly modifiable by the user. if the section does not exist, the editor will not take it into account.

this could make it easier to test the programs. note that this is just a suggestion.
Reply
#13
@DSMan195276

I've been working on a program (off & on) that does long division and searches for a repetend since before the .net days, and I'm very impressed by the new compiler optimizations that are possible. The program uses a lot of math, string math, string comparisons, etc..., especially in the main loop.

Listed below are comparison times using each of the optimization flags that I am aware of for QB64pe.  Each test was done at least 3 or 4 times to get the time variance.
Also, all of these tests were done using the most current release -- (QB64pe v0.8.0).
I'm using Windows Vista Home Premium SP2 -- 32 bit with a 2.6GHz Dual Core Processor (which can also still run and use the old, original QB4.5 for testing purposes).

  PROBLEM        -----    TIME TO COMPLETE        --  DIFFERENT OPTIMIZATION FLAGS USED  --                              -- IDENTICAL ANSWERS --    .exe SIZE
1/100,000,009  -----  00:00:12.8 to 00:00:13.1 -- with compiler optimization flag turned off -- (default setting).        (24,832,180 digit period)    2,572 KB
                                 00:00:09.5 to 00:00:10.0 -- with compiler optimization flag turned on -- (-O2).                        (24,832,180 digit period)    2,311 KB
                                 00:00:08.9 to 00:00:09.2 -- with compiler optimization flag turned on -- (-O3).                        (24,832,180 digit period)    2,429 KB
                                 00:00:09.2 to 00:00:09.6 -- with compiler optimization flag turned on -- (-Ofast).                    (24,832,180 digit period)    2,407 KB
                                 00:00:08.8 to 00:00:09.0 -- with compiler optimization flag turned on -- (-Os).                        (24,832,180 digit period)    2,165 KB

1/1,000,000,007  ---  00:08:31.6 to 00:08:34.1 -- with compiler optimization flag turned off -- (default setting).    (1,000,000,006 digit period)    2,572 KB
                                  00:06:47.6 to 00:06:59.3 -- with compiler optimization flag turned on -- (-O2).                    (1,000,000,006 digit period)    2,311 KB
                                  00:06.15.9 to 00:06.21.4 -- with compiler optimization flag turned on -- (-O3).                    (1,000,000,006 digit period)    2,429 KB
                                  00:06:29.3 to 00:06:42.9 -- with compiler optimization flag turned on -- (-Ofast).                  (1,000,000,006 digit period)    2,407 KB
                                  00:06:06.4 to 00:06:08.8 -- with compiler optimization flag turned on -- (-Os).                      (1,000,000,006 digit period)    2,165 KB

1/90,000,000,017  --  01:35:57.6 ------------------- with compiler optimization flag turned off -- (default setting).    (10,367,850,570 digit period)    2,572 KB
                                   01:15:30.3 ------------------- with compiler optimization flag turned on -- (-O2).                    (10,367,850,570 digit period)    2,311 KB
                                   01:10:19.0 ------------------- with compiler optimization flag turned on -- (-O3).                    (10,367,850,570 digit period)    2,429 KB
                                   01:09:56.2 ------------------- with compiler optimization flag turned on -- (-Os).                    (10,367,850,570 digit period)    2,165 KB

NOTE :  If you compile with more than one compiler option specified, the last option specified is the one that's used.
            Example -- compiling with -O3 -Os  _OR_ compiling with -Os will produce an executable that's the same size and CRC32 value as -Os.
Reply
#14
Would changing the c++ compiler processes from 3 to higher speed up the compile time required ?  I got CPU's to spare.

What number too large would create diminished returns ?
Reply
#15
> Would changing the c++ compiler processes from 3 to higher speed up the compile time required ? I got CPU's to spare.

Yes, in fact I typically set it quite high, like 13 when compiling locally. The default of 3 is a very conservative number, honestly.

If you set it high enough presumably you'll find the number of processes being spawned is slowing down the compilation, but I think you would have to go very high to reach that point. Other than that, if you're already getting 100% CPU all the time then more processes won't really do much, they only help if you're not maxing out your CPU already.

Also, you will find high numbers are only so effective because right now most of the code is confined to just two files, and each file can only be compiled by a single process. So in practice setting a higher number of processes just ends up getting bound by how long it takes for those two processes to finish up compiling those files.
Reply




Users browsing this thread: 4 Guest(s)