Search found 163 matches

by cbruce
Jul 18, 2022 17:02
Forum: General
Topic: PRINT breaks up long strings that contain lots of spaces
Replies: 8
Views: 955

Re: PRINT breaks up long strings that contain lots of spaces

MODE CON: is cool @dodicat! Thanks! For later searchers... after you've copied the data from the resized console... don't forget to reset the console size before exiting your program. Mine is normally 150w x 64h, so I just gave it this after I was done: changeconsolesize(150,64) Here's a full exampl...
by cbruce
Jul 18, 2022 15:04
Forum: General
Topic: PRINT breaks up long strings that contain lots of spaces
Replies: 8
Views: 955

Re: PRINT breaks up long strings that contain lots of spaces

I am running Windows 10. Here's what my output is like: [X X X X X X XX X X X X XX X X X X X XX X X X X X X XX XX X X X XX X XXXX X XX X X X X XX X XX X X XXX X X XX XXXX XXXXX XX X XX X X X X X X X XXXX X X XX X XXX X XX XXX X X X] [Z____________________Z_Z__________Z__Z__Z___ZZ_______Z_Z__________...
by cbruce
Jul 17, 2022 23:56
Forum: General
Topic: PRINT breaks up long strings that contain lots of spaces
Replies: 8
Views: 955

PRINT breaks up long strings that contain lots of spaces

Strange behavior with PRINT command: PRINT outputs additional newlines when simply printing long strings that contain lots of spaces to the console. Just execute these two PRINTs and copy the output from the console and paste it into an editor that can handle long strings. You will see that the X-st...
by cbruce
Feb 16, 2022 0:42
Forum: General
Topic: Calling function does nothing but takes huge amount of time vs called function
Replies: 47
Views: 3172

Re: Calling function does nothing but takes huge amount of time vs called function

Thanks @dodicat! I've found out a lot about handling floating point doubles since being guided down the snprintf() path.

I went ahead and wrote it up in tips and tricks...

Performance - Floating point doubles to string conversion
viewtopic.php?t=31461

Thanks!
CBruce
by cbruce
Feb 16, 2022 0:39
Forum: Sources, Examples, Tips and Tricks
Topic: Performance - Floating point doubles to string conversion
Replies: 0
Views: 1850

Performance - Floating point doubles to string conversion

/' Ok, @dodicat got me started down the rabbit-hole of floating point double to string conversion performance in my original post @: https://www.freebasic.net/forum/viewtopic.php?t=31450 Here's a slightly modified version of @dodicat's test code from: https://www.freebasic.net/forum/viewtopic.php?p=...
by cbruce
Feb 11, 2022 1:10
Forum: General
Topic: Calling function does nothing but takes huge amount of time vs called function
Replies: 47
Views: 3172

Re: Calling function does nothing but takes huge amount of time vs called function

@dodicat, it seems to me that your math cannot be correct... The profiling starts in Main() with __extract_decimals being a flat wrapper of the calls to the EXTRACT() functions. -> Main() __extract_decimals [action] -> EXTRACT_STAGE_01() -> EXTRACT_STAGE_02() <- EXTRACT_STAGE_02() -> EXTRACT_STAGE_0...
by cbruce
Feb 10, 2022 23:26
Forum: General
Topic: Calling function does nothing but takes huge amount of time vs called function
Replies: 47
Views: 3172

Re: Calling function does nothing but takes huge amount of time vs called function

Ok, I *CANNOT* do this with my real code, because there is too much other stuff going on in EXTRACT_STAGE_01(). But, with this test stub we are working with... I commented out EXTRACT_STAGE_01() and inlined the two calls to EXTRACT_STAGE_02() in the MAIN() itself. The ACTION profiling in the test st...
by cbruce
Feb 10, 2022 21:55
Forum: General
Topic: Calling function does nothing but takes huge amount of time vs called function
Replies: 47
Views: 3172

Re: Calling function does nothing but takes huge amount of time vs called function

There is a define that allows you to include/exclude the performance profiling code: . #define def_BEH_PROFILE true Just change that define to false and *ALL* profile code is *EXCLUDED* when compiling. As you can see, excluding the profiling code does very little to reduce the overall time of a run ...
by cbruce
Feb 10, 2022 1:47
Forum: General
Topic: Calling function does nothing but takes huge amount of time vs called function
Replies: 47
Views: 3172

Re: Calling function does nothing but takes huge amount of time vs called function

Hi adeyblue! Thanks, but I just modified the code and moved the RND() calls outside all the performance counters for the two extract() functions. As you can see, that made a very minimal impact on the time that extract_stage_01() is profiling. But also let me make clear.... How long extract_stage_01...
by cbruce
Feb 09, 2022 23:36
Forum: General
Topic: Calling function does nothing but takes huge amount of time vs called function
Replies: 47
Views: 3172

Re: Calling function does nothing but takes huge amount of time vs called function

Hi jj2007! Thanks, but you didn't run it with the command line parameters as shown at the top of the code... so it only ran *one* test with *five* extracts by default... you need one million tests (like the example command line) in order to see the magnitude of differences.

Thanks!
CBruce
by cbruce
Feb 09, 2022 22:18
Forum: General
Topic: Calling function does nothing but takes huge amount of time vs called function
Replies: 47
Views: 3172

Calling function does nothing but takes huge amount of time vs called function

My head-banging-against-the-wall issue is: Although EXTRACT_STAGE_01() actually does nothing more than call EXTRACT_STAGE_02() twice... EXTRACT_STAGE_01() is showing a runtime of approximately 8 seconds per 5 million calls... while EXTRACT_STAGE_02() is showing a runtime of less than 1 second for th...
by cbruce
Jan 27, 2022 21:56
Forum: Projects
Topic: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)
Replies: 979
Views: 343963

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V2.2.0 March 26, 2021)

Paul, another small issue concerns accessing overloaded functions from function/explorer lists. No mater which instance of the same function name I pick from the list - WinFBE always takes me to the first instance of that function in the file.

Thanks!
CBruce
by cbruce
Jan 27, 2022 2:22
Forum: Projects
Topic: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)
Replies: 979
Views: 343963

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V2.2.0 March 26, 2021)

Paul, is WinFBE parsing/tokenizing edited code in real-time? If so, then I should express the wish that I make hundreds of time every day.... "I wish that WinFBE had autocomplete for all of the rest of the tokens (variables, consts, types, etc.) in my code as I type!" Give me a base file t...
by cbruce
Jan 26, 2022 3:19
Forum: Projects
Topic: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)
Replies: 979
Views: 343963

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V2.2.0 March 26, 2021)

Paul, I already owe you a huge amount of thanks for WinFBE; I would not be productive in FreeBASIC without it.... And now you increase your good karma by making WinFBE even better and enabling this GUI nerd to finally be able to do something useful on Linux! (And that is a nice looking UI also!) Her...
by cbruce
Jan 25, 2022 4:03
Forum: General
Topic: Rotate bits in a byte
Replies: 6
Views: 2423

Re: Rotate bits in a byte

Just saw this @badidea, so I posted some macros in "tips and tricks"...

viewtopic.php?f=7&t=31421

CBruce