01-22-2026, 12:26 PM
(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:
Source size: 36 bytesCode: (Select All)' hello.bas
'
print("Hello, World!")
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 !!!!

