General > QB64 Discussion

QB64, Assembly, and Software Bloat

<< < (10/13) > >>

fatman2021:

--- Quote from: Barrykgerdes on April 16, 2012, 06:45:29 PM ---When I wrote large programs in Basic I was limited to 64kB for the source so I learnt to make effective loops and subroutines of the gosub type and FN?(W) and reduce all unnecessary overhead. This method of course was still needed when writing in Qbasic.

Compiling these programs produced executables in the order of 100KB. Of course limited graphics keeps the size down. These programs were greatly enlarged by 24MB of data files written in ASCII

When I converted these programs to Qb64 the executives increased in size by an order of 10 (still under 1 MB) the only real enlargement of a complete program was the requirment to supply the 6.52MB of Dll's. The data files are the same

The nett result of the executable program from compiled Qbasic 18.5MB  and Qb64 26MB

Barry

--- End quote ---

Most of the size increase found in a "compiled" qbasic program is because the BASIC interpreter is imbedded into the program.

Barrykgerdes:

--- Quote from: fatman2021 on April 16, 2012, 07:25:02 PM ---
--- Quote from: Barrykgerdes on April 16, 2012, 06:45:29 PM ---When I wrote large programs in Basic I was limited to 64kB for the source so I learnt to make effective loops and subroutines of the gosub type and FN?(W) and reduce all unnecessary overhead. This method of course was still needed when writing in Qbasic.

Compiling these programs produced executables in the order of 100KB. Of course limited graphics keeps the size down. These programs were greatly enlarged by 24MB of data files written in ASCII

When I converted these programs to Qb64 the executives increased in size by an order of 10 (still under 1 MB) the only real enlargement of a complete program was the requirment to supply the 6.52MB of Dll's. The data files are the same

The nett result of the executable program from compiled Qbasic 18.5MB  and Qb64 26MB

Barry

--- End quote ---

Most of the size increase found in a "compiled" qbasic program is because the BASIC interpreter is imbedded into the program.

--- End quote ---

Yes that is correct

fatman2021:

--- Quote from: Barrykgerdes on April 16, 2012, 08:28:29 PM ---
--- Quote from: fatman2021 on April 16, 2012, 07:25:02 PM ---
--- Quote from: Barrykgerdes on April 16, 2012, 06:45:29 PM ---When I wrote large programs in Basic I was limited to 64kB for the source so I learnt to make effective loops and subroutines of the gosub type and FN?(W) and reduce all unnecessary overhead. This method of course was still needed when writing in Qbasic.

Compiling these programs produced executables in the order of 100KB. Of course limited graphics keeps the size down. These programs were greatly enlarged by 24MB of data files written in ASCII

When I converted these programs to Qb64 the executives increased in size by an order of 10 (still under 1 MB) the only real enlargement of a complete program was the requirment to supply the 6.52MB of Dll's. The data files are the same

The nett result of the executable program from compiled Qbasic 18.5MB  and Qb64 26MB

Barry

--- End quote ---

Most of the size increase found in a "compiled" qbasic program is because the BASIC interpreter is imbedded into the program.

--- End quote ---

Yes that is correct

--- End quote ---

Well we have no interpreter.

Galleon:
This topic is precisely the reason I'll be supporting the creation of minimal-sized executables later this year. It's kind of like having a Swiss army knife with 20,000 features and complaining that you can unscrew a standard sized Phillips head screw with a 50c screwdriver. Of course I can take that component and remove it with a hacksaw and it'll weigh a lot less than the full set of tools, but my focus up until now has been on the creation of those 19,999 other just as useful tools.

If all I want to do is print "Hello World" I don't need a programming language for that...
hw.bat

--- Code: ---echo Hello World!
--- End code ---

Cyperium:

--- Quote from: fatman2021 on April 16, 2012, 04:05:44 PM ---
--- Quote from: Cyperium on April 16, 2012, 11:30:31 AM ---The print statement isn't only about printing a specific text, it is also about formatting that text and it should work in various screenmodes and many other things that aren't needed when only printing "Hello World". A part of the increased size is because of this flexibility.

If you can retain all the previous functionality with less code then be my guest and produce that code and give it to Galleon and I'm sure he will replace it. The case might also be that the entire framework of QB64 isn't about printing text and that the framework would need to be replaced in order to achieve what you want. In that case we would have to remake everything and still retain all the functionality of the other parts. It's a project in vain - if you ask me - cause QB64 is buildt to work seamlessly with all other functions, changing one thing involves changing a multitude of things that are in consequence of that - I'm thinking error checking, unicode, pages, images and the whole package that all involve the print statement and how it is executed within the framework.

To print "hello world" in assembly is easy enough, but what if we want to print "hello world", a$? We would need to reference the variables, and what if we want to print the value of a function? We would need to reference the function as well, and what if we need to print to a different page or a different image or a different screenmode? We would need that functionality too. What if we want to print in a specific unicode page? Well... I hope you see the point. QB64 isn't buildt around the print statement and other priorities were greater, also the code need to be understandable for a one man project that will constantly need to be revised and added to - which is hard to do with very specialised code (which is often the result of trying to squeeze the size).

--- End quote ---

If what you are saying was true, than Software written in BASIC would of never ran on computers with only 64KB of RAM.

--- End quote ---
What I was saying doesn't apply to all versions of BASIC but applies to QB64. I just gave the reason not the excuse.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version