Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How Many Years Until QB64ers are CALL OBSOLETE?
#38
(01-22-2026, 11:07 AM)Fifi Wrote: With regard to programming languages, below atre some interesting tests for the simple "Hello, World!":

C Source:
Code: (Select All)
//  hello.c
//
#include <stdio.h>
int main(int argc, const char * argv[]) {
    printf("Hello, World!\n");
    return 0;
}

Source size:       151 bytes
Executable size: 27,520 bytes

C++ Source:
Code: (Select All)
//  hello.cpp
//
#include <iostream.h>
int main(int argc, const char * argv[]) {
    printf("Hello, World!\n");
    return 0;
}

Source size:       159 bytes
Executable size: 36,480 bytes (That's already 35% larger than with C for the same tiny program!)

qb64pe Source:
Code: (Select All)
'  hello.bas
'
print("Hello, World!")
Source size:       36 bytes
Executable size: 1,249,892 bytes (+ hello_start.command size: 261 bytes)

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)?
And why such a huge difference especially between the code generated with C++ and that created with qb64pe, since the qb64pe's executable is said to be the generated code of the "basic" language code simply translated into C++ code?
So, what is added to the qb64pe code to create an executable 35 times larger, and why?
I would like to understand, simply to satisfy my curiosity.
Cheers.
Fifi
Lets add this:   (Makes QB64PE look A LOT better !)
RUST

fn main() {
  println!("Hello World!");
}

44 bytes of source.
Executable size:      13,271,344 BYTES !!!!






Reply


Messages In This Thread
RE: How Many Years Until QB64ers are CALL OBSOLETE? - by ahenry3068 - 01-22-2026, 12:26 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 906 11-28-2023, 03:41 AM
Last Post: TerryRitchie
  You never CALL Pete 13 2,416 12-02-2022, 12:23 AM
Last Post: mnrvovrfc
  Call a video from QB64 Kernelpanic 3 907 09-02-2022, 05:35 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)