Author Topic: What language is faster execute than QB64 ?  (Read 10267 times)

0 Members and 1 Guest are viewing this topic.

Offline MWheatley

  • Newbie
  • Posts: 64
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #15 on: March 20, 2019, 11:59:08 am »
That probably explains why Dean, QBguy, likes modern FORTRAN. He's a pretty amazing coder, so I always wondered why he'd like that language, as the only intro I had to it was punch cards from the 1970's. If I only had that language experience, it would have turned me off on coding forever.

Pete

Take a look at this attachment, sourced off the Internet, of what I believe to be Microsoft Fortran from the mid-1990s.  You can see the evolution in progress -- it's nothing like the punched cards I used, either!

Obviously, more modern versions have extended this similarity even further.  But with minimal re-work, porting of simple programs is very possible.

Malcolm

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #16 on: March 20, 2019, 12:17:29 pm »
It didn't work. I printed out your PNG, punched out the "0" s in the code, and ran it through the trash compactor. Sadly, nothing printed. :(

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Larryrl

  • Newbie
  • Posts: 26
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #17 on: March 24, 2019, 04:59:41 pm »
can someone post a link for the newer fortrans 90, 95 or 2003?

Offline MWheatley

  • Newbie
  • Posts: 64
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #18 on: March 24, 2019, 05:58:35 pm »
can someone post a link for the newer fortrans 90, 95 or 2003?

Gee, just Google them. Thousands and thousands and thousands of pages.  Search terms "Silverfrost Fortran", "Intel Fortran", "The Fortran Company", and "Lahey Fortran" are where I'd start.

Plenty of good books on Amazon/eBay at about the $5 mark.

And very a good *free* compiler at gfortran -- the GNU Fortran project.  My advice: avoid the gcc Fortran compiler, which is no longer maintained.

Malcolm

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #19 on: March 24, 2019, 05:59:24 pm »
there's g95 http://www.g95.org/downloads.shtml#Win but it's rather old, I would find a mingw distribution which includes fortran, perhaps you might find something useful here https://chocolatey.org/packages?q=development

Offline MLambert

  • Forum Regular
  • Posts: 115
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #20 on: March 25, 2019, 02:26:42 am »
Thank you all for some great ideas.

Jack ... If I run the command in the Txt file with the optimise parameter .. will this produce a new QB64.exe ?

_Vince - Could you pls give me a couple of verbal lines .. not code .. of an example of multithreading ?

Again ,

Thank you everyone

Mike

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #21 on: March 25, 2019, 11:14:40 am »
Thank you all for some great ideas.

Jack ... If I run the command in the Txt file with the optimise parameter .. will this produce a new QB64.exe ?

Again ,

Thank you everyone

Mike
as far as I know, it only affects the programs that you compile with QB64

Offline MLambert

  • Forum Regular
  • Posts: 115
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #22 on: March 25, 2019, 07:09:04 pm »
Hi Jack,

What I meant was will it build a new QB64.exe file ...

Thks,

Mike

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #23 on: March 25, 2019, 07:20:43 pm »
not as far as I know.

Offline MLambert

  • Forum Regular
  • Posts: 115
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #24 on: March 25, 2019, 07:25:04 pm »
Hi Jack,

What will it do then ?

Mike

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #25 on: March 25, 2019, 07:32:34 pm »
adding -O2 will cause your program compiled with QB64 to be optimized, sometimes the resulting exe will run significantly faster.

Offline MLambert

  • Forum Regular
  • Posts: 115
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #26 on: March 25, 2019, 07:37:15 pm »
Sorry to go around in circles ... where do I use the -O2 parameter ??

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: What language is faster execute than QB64 ?
« Reply #27 on: March 25, 2019, 07:50:58 pm »
If you compile QB64.bas with -O2, you’ll create an optimized version of QB64(2).EXE.  (Or some such variant upon the name.)
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #28 on: March 25, 2019, 08:10:33 pm »
@MLambert
in the folder qb64\internal\c in the file makeline_win.txt, add -O2 for optimization

QB64 translates your basic program to C++ and then invokes the C++ compiler to compile that code with the command options in makeline_win.txt

Offline MLambert

  • Forum Regular
  • Posts: 115
    • View Profile
Re: What language is faster execute than QB64 ?
« Reply #29 on: March 25, 2019, 08:52:30 pm »
Thks Jack.

c_compiler\bin\g++ -s -Wfatal-errors -w -Wall qbx.cpp -lws2_32 -lwinspool parts\core\os\win\src.a -lopengl32 -lglu32 -lwinmm -lgdi32 -mwindows -static-libgcc -static-libstdc++ -D GLEW_STATIC -D FREEGLUT_STATIC -lksguid -lole32 -lwinmm -ldxguid -o ..\..\

Pls show me where I place the -O2 parameter ..

Thks,

Mike