Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How Many Years Until QB64ers are CALL OBSOLETE?
#40
(01-22-2026, 12:26 PM)ahenry3068 Wrote: Who can explain such a difference in size between all these executables (which BTW proves that C is more efficient than C++ even for such a tiny program)?

This only proves that higher tier languages package more functions into the EXE than others.

When you compile a QB64 program, you don't just get the code you wrote; you get every function which is attached to QB64.

You didn't use TAN, but it's in there.
You didn't use _PRINTSCREEN, but it's in there.
You didn't use _MEM, but it's in there.
You didn't use $RESIZE, but it's in there.

*ALL* The functions in QB64PE are neatly packed up and attached in the source code that you compile, in case you *DID* want to make use of them.

Them all sitting there, however, has very little impact on the actual program that you're running.

Code: (Select All)
PRINT "Hello World"

SUB SORT
SUB OPENFILES
SUB EATCHEETOS
SUB FOO
SUB FOOFOOFOO

Now my program above has one command to execute and half a dozen subs. Since it never calls out to those subs, their impact is really minimal on the performance of the program itself. They might affect memory usage by sitting around when they don't have to, and they might affect load times of the program by 0.001 nanosecond on today's hardware, but as for performance?

They're just unreferenced memory that never gets accessed or called to.

There's no real reason to take the effort to strip them out of every EXE you compile. Just leave them there and forget about them.

So... in the end you get a larger EXE, but performance wise, it performs exactly the same as the smaller program. It just has a bunch of stuff sitting in it which you "COULD" have used, but never did.

That's the difference in the compiled sizes. The more things you can just plug in and let the language do for you, even if you use those things or not, the larger the EXE is going to end up being. It doesn't really affect performance, but it does affect flexibility.

Try to write a nice program of any complexity in C, without importing a single library into it. Draw a "Hello World", make it a graphical image, and then rotate it 360 in a circle.... without any library usage whatsoever. I can do it in QB64 in 3 minutes from start to finish because all the tools are already there. How long would it take to code that from scratch in C?
Reply


Messages In This Thread
RE: How Many Years Until QB64ers are CALL OBSOLETE? - by SMcNeill - 01-22-2026, 04:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Do you think we'll have new hobby programmers 10 years in the future? Pete 16 2,975 08-14-2024, 12:03 AM
Last Post: SMcNeill
  BASIC is 60 years old bert22306 12 2,277 07-29-2024, 05:19 PM
Last Post: bobalooie
  Call by reference / value Kernelpanic 3 905 11-28-2023, 03:41 AM
Last Post: TerryRitchie
  You never CALL Pete 13 2,415 12-02-2022, 12:23 AM
Last Post: mnrvovrfc
  Call a video from QB64 Kernelpanic 3 906 09-02-2022, 05:35 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)