@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.